m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/good/concat.mim
diff options
context:
space:
mode:
Diffstat (limited to 'good/concat.mim')
-rw-r--r--good/concat.mim7
1 files changed, 7 insertions, 0 deletions
diff --git a/good/concat.mim b/good/concat.mim
new file mode 100644
index 0000000..192da56
--- /dev/null
+++ b/good/concat.mim
@@ -0,0 +1,7 @@
+(letrec (concatN : [Int] -> [Int] -> [Int] l1 : [Int] l2 : [Int])
+ (if (isnil l1)
+ l2
+ (let (h) (head l1)
+ (let (t) (tail l1)
+ (cons h (concatN t l2)))))
+ (concatN (cons 2 nil : [Int]) (cons 1 nil : [Int])))