PasteRack.org
Paste # 97265
2019-03-10 14:04:04

Fork as a new paste.

Paste viewed 139 times.


Embed:

reduce

  1. #lang racket
  2.  
  3. (define reduce
  4.   (lambda (op l id)
  5.     (if (null? l)
  6.         id
  7.         (op (car l) (reduce op (cdr l) id)))))

=>