-
Notifications
You must be signed in to change notification settings - Fork 1
/
dummy.clj
51 lines (40 loc) · 1.09 KB
/
dummy.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
(ns dum.dummy
(:require [scicloj.note-to-test.v1.api :as note-to-test]
[tablecloth.api :as tc]))
(note-to-test/define-value-representations!
[{:predicate symbol?
:representation (partial str "symbol ")}
{:predicate tc/dataset?
:representation (fn [ds]
(-> ds
(update-vals vec)
(->> (into {}))))}
{:predicate (partial = 5)
:representation (constantly :five)}
{:predicate map?
:representation (fn [m]
(-> m
(update-keys note-to-test/represent-value)
(update-vals note-to-test/represent-value)))}
{:predicate sequential?
:representation (partial mapv note-to-test/represent-value)}])
(+ 2 3)
{:x (+ 2 3)}
(+ 4
5
6)
^:note-to-test/skip
(+ 1 2)
(defn f [x]
(+ x 19))
(f 12)
(-> {:x [1 2 3]}
tc/dataset
(tc/map-columns :y [:x] (partial * 10)))
(f 13)
{:x 9}
(comment
(note-to-test/gentest! "notebooks/dum/dummy.clj"
{:accept true
:verbose true})
,)