Hacker News new | ask | show | jobs
by bruce343434 22 days ago

    :set {:job "Engineer"}
    :where |(= ($ :job) "Developer")
What is going on there in that where syntax?
1 comments

|(...) is the same as (fn ...) making an anonymous function. $ is an argument (in a 1 arity anonymous function.) $ is getting the whole row which is a hashmap and e.g. ({:key "value"} :key) is a way of retrieving from a hashmap. So it's "where value in column job is "Developer".