This file contains hidden or 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
| (defndynamic derive-special-internal2 [comb f ms] | |
| (if (= (length ms) 0) | |
| '(zero) | |
| (if (= (length ms) 1) | |
| (f (caar ms)) | |
| (list comb | |
| (f (caar ms)) | |
| (derive-special-internal2 comb f (cdr ms)))))) | |
| (defndynamic derive-special-internal [comb f a] |
This file contains hidden or 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
| ; as an introduction, we tried to do string capitalization by hand, | |
| ; using as many different interesting idioms as possible | |
| (defn capitalize-char [c] | |
| (if (Char.lower-case? c) | |
| (=> c | |
| (to-int) | |
| (- 32) | |
| (from-int)) | |
| c)) |
This file contains hidden or 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
| (load "[email protected]:carpentry-org/sockets@master") | |
| (load "[email protected]:carpentry-org/http@master") | |
| (load "https://veitheller.de/git/carpentry/[email protected]") | |
| (defn read-all [sock s] | |
| (let [read (Socket.read sock)] | |
| (if (= &read "") | |
| (Response.parse &s) | |
| (let [acc (String.concat &[s read])] |
OlderNewer