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
| colors: | |
| # Default colors | |
| primary: | |
| background: '#1f2430' | |
| foreground: '#cbccc6' | |
| bright_foreground: '#f28779' | |
| # Normal colors | |
| normal: | |
| black: '#212733' # |
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
| -- This gist shows how we can use abilities to provide nicer syntax for any monad. | |
| -- We can view abilities as "just" providing nicer syntax for working with the | |
| -- free monad. | |
| ability Monadic f where | |
| eval : f a -> a | |
| -- Here's a monad, encoded as a first-class value with | |
| -- two polymorphic functions, `pure` and `bind` | |
| type Monad f = Monad (forall a . a -> f a) (forall a b . f a -> (a -> f b) -> f b) |
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
| (def stylesheet (.-StyleSheet ReactNative)) | |
| (defn create-stylesheet [styles] | |
| (->> styles | |
| (clj->js) | |
| (.create stylesheet) | |
| (js->clj) | |
| (clojure.walk/keywordize-keys))) | |
| ; usage |