fork download
  1. (define (all-but-last xs)
  2. (match xs
  3. [(list x) (list)]
  4. [(list-rest x xs) (cons x (all-but-last xs))]))
  5.  
  6.  
  7. (displayln
  8. (all-but-last '[1 2 3 4 5]))
Success #stdin #stdout 0.25s 97600KB
stdin
Standard input is empty
stdout
(1 2 3 4)