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 figma.specs | |
(:require [clojure.spec.alpha :as s])) | |
(def color-chan | |
(s/and number? #(<= 0 % 1))) | |
(def alpha-chan | |
(s/and number? #(<= 0 % 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
'use strict'; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
var _affix = require('./affix'); | |
Object.defineProperty(exports, 'Affix', { | |
enumerable: true, |
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
'use strict'; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
var _affix = require('./affix'); | |
Object.defineProperty(exports, 'Affix', { | |
enumerable: true, |
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
open Antd | |
open Form | |
open ApolloClient | |
type action = | |
| EditEmail of string | |
| EditPassword of string | |
| Submit | |
type state = { | |
email: string; | |
password: string;} |
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
open Antd; | |
open Form; | |
open ApolloClient; | |
type action = | |
| EditEmail(string) | |
| EditPassword(string) | |
| Submit; |
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
open Jest | |
open Atom | |
let _ = test "Atom create" @@ | |
fun () -> begin | |
let a = atom 0 in | |
ignore Expect.(expect @@ deref a |> toBe 0); | |
addWatch a 0 (fun _key _atom oldV newV -> | |
Js.log "oldV"; |
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
type meta | |
type 'a t = { | |
state: 'a ref; | |
meta: meta option; | |
validator: 'a validator option; | |
watches: (int, 'a fn) Hashtbl.t; | |
} | |
and 'a validator = 'a -> bool | |
and 'a fn = |
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 spurs.core | |
(:require [re-natal.support :as support] | |
[rum.core :as rum :refer-macros [defc defcc defcs]] | |
[cljs-exponent.components :refer [text view element] :as rn] | |
[clojure.string :as str] | |
[clojure.walk :as w] | |
[clojure.set :refer [rename-keys]])) | |
(def ExNavigation (js/require "@expo/ex-navigation")) | |
(def create-router (aget ExNavigation "createRouter")) |
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 myapp.core | |
(:require [re-natal.support :as support] | |
[rum.core :as rum :refer-macros [defc defcc]] | |
[cljs-exponent.components :refer [text view image touchable-highlight] :as rn])) | |
(defn ->react | |
"Convert a rum component to a react component." | |
[rum-component] | |
(:rum/class (meta rum-component))) |
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
open Utils | |
let imperative_sort a = | |
let l = Array.length a in | |
for i = 0 to (l - 1) do | |
let min_idx = ref i in | |
for j = i + 1 to (l - 1) do | |
if (a.(j) < a.(!min_idx)) then min_idx := j | |
done; |