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
;; (:require [lonocloud.step.async.pschema :as s]) | |
;; Define a higher-order function. Note the 'format-f' argument that is specified to be a function | |
;; of one arity that takes a String and an s/Int to produce a String | |
(s/defn write-person [format-f :- (s/fn String [String s/Int]) | |
person :- {:name String | |
:age s/Int}] | |
(format-f (:name person) (:age person))) | |
(def joe {:name "joe" :age 19}) |