Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Query Your Python Lists. Parent comment
{"name" (includes? "k"), "age" (< 20)}
{"name" #(includes? % "k"), "age" #(< % 20)}
{"name" (fn [name] (includes? name "k")), "age" (fn [age] (< age 20))}
You could serialize the patterns using EDN as a substitute for JSON.
Fun stuff.
I wrote something [similar][1] in javascript. With that it would be:
const is_k_kid = tisch.compileFunction((etc) => ({ 'name': name => name.includes('k'), 'age': age => age < 20, ...etc })); const result = input.filter(is_k_kid);
[1]: https://github.com/dgoffredo/tisch
There are no comments on this comment yet.
You could serialize the patterns using EDN as a substitute for JSON.
Fun stuff.
I wrote something [similar][1] in javascript. With that it would be:
Yes, "...etc" is part of the DSL.[1]: https://github.com/dgoffredo/tisch