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
(ns om.next.spec | |
(:require [cljs.spec :as s])) | |
(s/def ::ident (s/and vector? (s/cat :ident keyword? :value #(not (coll? %))))) | |
(s/def ::join-key (s/or :prop keyword? :ident ::ident)) | |
(s/def ::join (s/and (s/map-of ::join-key ::query) #(= (count %) 1))) | |
(s/def ::union (s/and (s/map-of keyword? ::query) #(> (count %) 1))) | |
(s/def ::param-expr | |
(s/cat :query-expr ::query-expr |
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
(ns playingwithsyntax.core) | |
;; We can define our own 'reader', which says that <> are waaay coler than Sexps. | |
;; We "bottom" out to clojure, so we parse the <>-exp and return a sexp that clojure understands. | |
;; To support list literals we can return a quoted list from read. | |
(comment | |
;; This is useful for stepping through the my-read function | |
(def string-to-read "(+ 1 1)") | |
(def string-to-read "<+ 1 1>")) |
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
const fetchCreditCheck = (context, event) => new Promise((resolve, reject) => { | |
console.log("fetch credit check") | |
return resolve({ | |
status: "APPROVED" | |
}) | |
}); | |
const fetchBankIdStatus = (context, event) => new Promise((resolve, reject) => { | |
console.log("fetch bankid status") | |
return resolve({ |