diff options
Diffstat (limited to 'examples/list.fusp')
-rw-r--r-- | examples/list.fusp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/list.fusp b/examples/list.fusp new file mode 100644 index 0000000..2fce492 --- /dev/null +++ b/examples/list.fusp @@ -0,0 +1,11 @@ +append [] ys = ys; +append [x:xs] ys = [x:append xs ys]; + +flatten [] = []; +flatten [h:t] = append h (flatten t); + +isEmpty [] = 1; +isEmpty _ = 0; + +hd [x:_] = x; +tl [_:x] = x; |