Skip to content

Instantly share code, notes, and snippets.

@Michaelgathara
Created March 6, 2024 18:08
Show Gist options
  • Save Michaelgathara/cfb0f2d1b09db28fba313c05af0c6e71 to your computer and use it in GitHub Desktop.
Save Michaelgathara/cfb0f2d1b09db28fba313c05af0c6e71 to your computer and use it in GitHub Desktop.
Compose List
(define (compose-list fs)
(lambda (x)
(foldr (lambda (f acc) (f acc)) x fs)))
(define (add1 x) (+ x 1))
(define (number->string x) (number->string x))
((compose-list (list number->string add1)) 3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment