urania icon indicating copy to clipboard operation
urania copied to clipboard

let-like syntactic abstraction

Open ghost opened this issue 9 years ago • 0 comments

A let-like macro for declaring fetches withouth worrying about dependencies:

(flet [posts (latest-posts 10)
       post-scores (u/traverse score posts)
       authors (u/traverse user posts)]
 (map (fn [post score author]
        (merge post {:author author :score score})) 
      posts 
      post-scores 
      authors))        

which will be translated to calls to the combinators under the hood, resolving the data dependencies based on the code.

ghost avatar Mar 02 '16 16:03 ghost