X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=gCons.icl;h=6e5aaa52d14b48efc5685f319005e369559605dc;hb=af388f6b2c06d38b400d482ac3ccc1f819b5bf9f;hp=a7ce132a5903cb7b6851c1721280aa4c33de67b1;hpb=f63e9891ef344e992a8a837cd3301ba3209f1e5c;p=mTask.git diff --git a/gCons.icl b/gCons.icl index a7ce132..6e5aaa5 100644 --- a/gCons.icl +++ b/gCons.icl @@ -22,6 +22,7 @@ consName{|Int|} i = toString i consName{|Bool|} b = toString b consName{|Char|} c = toString c consName{|String|} s = s +consName{|[]|} _ _ = "[]" consName{|(->)|} f g x = g (x undef) generic consIndex a :: a -> Int @@ -35,6 +36,7 @@ consIndex{|Int|} i = i consIndex{|Bool|} b = if b 1 0 consIndex{|Char|} c = toInt c consIndex{|String|} _ = 0 +consIndex{|[]|} _ _ = 0 generic conses a :: [a] conses{|CONS|} f = [CONS (hd f)]