-
-
Save rightfold/0a0a6e9c7d4ba19cbf4c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define http (require "http")) | |
(define ! | |
(lambda (n) | |
(if (< n 2) | |
1 | |
(* n (! (pred n)))))) | |
(define all | |
(lambda (xs) | |
(or (empty? xs) | |
(and (head xs) | |
(all (tail xs)))))) | |
(.log $console (all '(1 2 3 4 5 6))) | |
(define server | |
(.createServer http | |
(lambda (req res) | |
(let (n (int (drop 1 (:url req))) | |
f (! n)) | |
(.end res (string f)))))) | |
(.listen server 1337) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment