- High level overview https://yogthos.github.io/ClojureDistilled.html
- An Animated Introduction to Clojure https://markm208.github.io/cljbook/
- Interactive tutorial in a browser https://tryclojure.org/
- Interactive exercises http://clojurescriptkoans.com/
- Clerk notebooks with introductory examples https://github.clerk.garden/anthonygalea/notes-on-clojure
- More interactive exercises https://4clojure.oxal.org/
- Lambda Island tutorials https://lambdaisland.com/
- Functional Programming with Clojure resources https://practicalli.github.io/
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
| import Data.List | |
| import Data.Char | |
| import System.IO | |
| getSearchWords :: IO [String] | |
| getSearchWords = do | |
| putStrLn "Specify the words to search:" | |
| aux | |
| where | |
| aux = do |
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
| <?php | |
| declare(strict_types=1); | |
| namespace Core\Domain\Time; | |
| use DateTimeImmutable; | |
| use DateTimeZone; | |
| use Generator; | |
| use Iterator; |
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
| -- Compile with -threaded | |
| import System.IO | |
| import Control.Concurrent | |
| getGreeting :: IO String | |
| getGreeting = do | |
| -- Get id and convert to string | |
| tid <- myThreadId | |
| let greeting = "Hello from " ++ show tid |
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
| # Some Phel utility fns / macros | |
| (ns my-project\utils) | |
| (defn parse-float | |
| "Converts to float without doing odd type conversions, acting more like | |
| Float/parseFloat in Clojure." | |
| [x] | |
| (when-not (php/is_numeric x) | |
| (throw (php/new \InvalidArgumentException | |
| (str "Invalid value for parse-float (" x ")")))) |
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
| ### Phel wrapping over WP / PHP API's | |
| ## TODO make a library some day.. | |
| (ns my-project\lib\wp | |
| (:require phel\str :as str) | |
| (:require phel\pdo :as pdo) | |
| (:require phel\pdo\statement :as statement)) | |
| ## Initialize WordPress plugin environment for REPL / tests | |
| (defn resolve-wp-load-path |
OlderNewer
