Generalize ++hunt and move it to hoon.hoon.

This commit is contained in:
C. Guy Yarvin 2016-12-02 11:30:02 -08:00
parent 5f3ee116eb
commit 91d4655b2f

View File

@ -257,6 +257,13 @@
|* b/*
?.((a b) ~ [~ u=b])
::
++ hunt :: first of units
|* {ord/$-({* *} ?) one/(unit) two/(unit)}
^- (unit ?(_,.+.one _,.+.two))
?~ one two
?~ two one
?:((ord ,.+.one ,.+.two) one two)
::
++ lift :: lift mold (fmap)
|* a/mold :: flipped
|* b/(unit) :: curried