Skip to content

Commit

Permalink
collapse singleton threading form
Browse files Browse the repository at this point in the history
  • Loading branch information
countvajhula committed Mar 10, 2023
1 parent bf493da commit 18dee20
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions qi-lib/flow/core/compiler.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
;; collapse deterministic conditionals
[((~datum if) (~datum #t) f g) #'f]
[((~datum if) (~datum #f) f g) #'g]
;; trivial threading form
[((~datum thread) f)
#'f]
;; associative laws for ~>
[((~datum thread) _0 ... ((~datum thread) f ...) _1 ...)
#'(thread _0 ... f ... _1 ...)]
Expand Down

0 comments on commit 18dee20

Please sign in to comment.