Advertisement
MrRamiz

VZS:farok-reku-append

Apr 5th, 2022
3,144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Racket 0.31 KB | None | 0 0
  1. (define (appendv1 A B)
  2.   (farok-reku-append B A B))
  3.  
  4. (define (farok-reku-append akku A B)
  5.   (cond
  6.     [(empty? A) akku]
  7.     [else
  8.      (define fejA (first A))
  9.      (define farokA (rest A))
  10.      (define akku2(cons fejA B))
  11.      (appendv1 farokA akku2)
  12.     ]))
  13.  
  14.  
  15. (writeln (appendv1(list 5 2 1) (list 3 6 9)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement