mirror of
https://github.com/kanaka/mal.git
synced 2024-10-26 14:22:25 +03:00
83665b4fda
equality.mal: - fix typos - let and2 and or2 always return booleans - when looping in sequences, compare lengths only once - empty? instead of an equality test - when looping on a keys, do not check if a contains the current key - change the `cond` logic: when a is a sequence and b a map, return false instead of delegating to scalar-equal?. - add tests memoize.mal: - make explicit that the function name must be kept - fix typo in tests protocols.mal: - document - add a function mapping an object to its type - add default types for remaining built-in MAL values - let defprotocol return the new protocol instead of last method - set the right profile for abstract methods, improving error messages - replace incomplete example with lots of tests pprint: - escape parenthesis in expected test results [kanaka] - explain in lib/README.md how to run tests/lib/*. - rename folds to reducers and composition to threading - move fib and sumdown from lib/ to tests/
13 lines
432 B
Plaintext
13 lines
432 B
Plaintext
(load-file "../lib/threading.mal") ; ->
|
|
(load-file "../lib/perf.mal") ; time
|
|
(load-file "../lib/test_cascade.mal") ; or
|
|
|
|
;;(prn "Start: basic macros performance test")
|
|
|
|
(time (do
|
|
(or false nil false nil false nil false nil false nil 4)
|
|
(cond false 1 nil 2 false 3 nil 4 false 5 nil 6 "else" 7)
|
|
(-> (list 1 2 3 4 5 6 7 8 9) rest rest rest rest rest rest first)))
|
|
|
|
;;(prn "Done: basic macros performance test")
|