Upgrade to Pro — share decks privately, control downloads, hide ads and more …

React & ClojureScript in production at Attendify

React & ClojureScript in production at Attendify

React Kyiv, Feb 17, 2017

Roman Liutikov

February 18, 2017
Tweet

More Decks by Roman Liutikov

Other Decks in Programming

Transcript

  1. (defn row-bindings [f ocrs] (concat (:bindings f) (->> (map vector

    (:ps f) ocrs) (filter (fn [[p ocr]] (named-wildcard-pattern? p))) (map (fn [[p ocr]] [(:sym p) (leaf-bind-expr ocr)]))))) (defn existential-pattern? [x] (instance? IExistentialPattern x)) (defn wildcard-or-existential? [x] (or (wildcard-pattern? x) (existential-pattern? x)))
  2. (defn row-bindings [f ocrs] (concat (:bindings f) (->> (map vector

    (:ps f) ocrs) (filter (fn [[p ocr]] (named-wildcard-pattern? p))) (map (fn [[p ocr]] [(:sym p) (leaf-bind-expr ocr)]))))) (defn existential-pattern? [x] (instance? IExistentialPattern x)) (defn wildcard-or-existential? [x] (or (wildcard-pattern? x) (existential-pattern? x))) What I see
  3. (defn row-bindings [f ocrs] (concat (:bindings f) (->> (map vector

    (:ps f) ocrs) (filter (fn [[p ocr]] (named-wildcard-pattern? p))) (map (fn [[p ocr]] [(:sym p) (leaf-bind-expr ocr)]))))) (defn existential-pattern? [x] (instance? IExistentialPattern x)) (defn wildcard-or-existential? [x] (or (wildcard-pattern? x) (existential-pattern? x))) What the non-Lisper sees
  4. • simple, almost no syntax • functional programming • pragmatic

    • everything is immutable • guest language БЕЗ МОНАД ВСЕ ОЧЕНЬ ПРОСТО
  5. (defc Counter [num] [:div [:button {:on-click increment-counter} "-"] [:span num]

    [:button {:on-click decrement-counter} "+"]]) const Counter = (num) => ( <div> <button onClick={incrementCounter}>-</button> <span>{num}</span> <button onClick={decrementCounter}>+</button> </div> );