Singly-linked list/Element definition: Difference between revisions

Content added Content deleted
Line 314: Line 314:
datatype rclist_t (t : t@ype+, n : int) =
datatype rclist_t (t : t@ype+, n : int) =
| rclist_t_nil (t, 0)
| rclist_t_nil (t, 0)
| {0 <= n} rclist_t_cons (t, n + 1) of rclist_t (t, n)
| {0 <= n} rclist_t_cons (t, n + 1) of (t, rclist_t (t, n))


(* The Rosetta Code linear list type can contain any vt@ype and so is
(* The Rosetta Code linear list type can contain any vt@ype and so is
Line 320: Line 320:
dataviewtype rclist_vt (vt : vt@ype+, n : int) =
dataviewtype rclist_vt (vt : vt@ype+, n : int) =
| rclist_vt_nil (vt, 0)
| rclist_vt_nil (vt, 0)
| {0 <= n} rclist_vt_cons (vt, n + 1) of rclist_vt (vt, n)</lang>
| {0 <= n} rclist_vt_cons (vt, n + 1) of (vt, rclist_vt (vt, n))</lang>


=={{header|AutoHotkey}}==
=={{header|AutoHotkey}}==