SHARE
TWEET

Untitled

a guest May 19th, 2017 41 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (define (reverse! lst)  
  2.   (let (
  3.     (pos 0)
  4.     (tsl '())
  5.     )
  6.     (set! tsl (reverse lst))
  7.     (define (help tsl)
  8.       (if (null? (cdr tsl))
  9.       (begin
  10.         (set-car! (drop lst pos) (car tsl))
  11.         (set! pos 0)
  12.         lst
  13.         )
  14.       (begin
  15.         (set-car! (drop lst pos) (car tsl))
  16.         (set! pos (+ 1 pos))
  17.         (help (cdr tsl))
  18.         )
  19.       )
  20.       )
  21.     (help tsl)
  22.     )
  23.   )
RAW Paste Data
Challenge yourself this year...
Learn something new in 2017
Top