Quick actions

cmd+k|ctrl+k

Navigation

Languages

Equirecursive types

Snippet info

Language

Ocaml

Visibility

public

Author

rightfold

Created

2018-05-01T15:34:50Z

Updated

2018-05-01T15:34:50Z

type 'a list = [ `Nil | `Cons of 'a * 'a list ]

let twice : 'a -> [ `Nil | `Cons of 'a * [ `Nil | `Cons of 'a * 'a list ] ] =
    fun x -> `Cons (x, `Cons (x, `Nil))

let xs : int list =
    twice 1
INFO