move ++hunt to a general unit gate in hoon.hoon

This commit is contained in:
Anton Dyudin 2016-11-30 14:02:06 -08:00
parent 2ba69ff74c
commit b41242610f
2 changed files with 10 additions and 8 deletions

View File

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

View File

@ -4103,13 +4103,6 @@
~(rud at h.t.yed) ":" ~(rud at m.t.yed) ":" ~(rud at s.t.yed)
" " "+0000"
==
:: :: ++hunt:chrono:
++ hunt :: first of unit dates
|= {one/(unit @da) two/(unit @da)}
^- (unit @da)
?~ one two
?~ two one
?:((lth u.one u.two) one two)
:: :: ++stud:chrono:
++ stud :: parse UTC format
=< |= a/cord
@ -4410,7 +4403,9 @@
--
++ behn ^?
|%
++ chrono chrono:userlib
++ chrono
:- chrono:userlib
hunt=|=({a/(unit @da) b/(unit @da)} (hunt lth a b))
--
++ clay ^?
|%