m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/good/concat.mim
blob: 192da567fdbe56d9659423a5da7def8dc37505cf (plain)
1
2
3
4
5
6
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])))