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 1, 2023
1 parent d537237 commit 1c8cd0a
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 @@ -39,6 +39,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 1c8cd0a

Please sign in to comment.