Warning: long post
I thought it would be cool to have a special keybinding for evaluating patterns as transitions instead of having to type them out.
I came up with this function:
let bindTransition transition time stream streamNum p = transition streamNum time $ p
.
What it does is take a transition function, a time, a streamReplace
function and number (like p 1
), and a pattern.
It has the same effect of a transition, but in theory, it would let you place the transition function right in-front of the streamReplace
function, like so:
let bindTransition transition time stream streamNum p = transition streamNum time $ p
_jumpIn = bindTransition jumpIn
_jumpIn 1 d1 $ s "bd"
(because d1 = p 1 . (|< orbit 1))
)
you could then have a key-combo that would evaluate a pattern like d1 $ s "bd"
, but add jumpIn 1
to the beginning.
however, I've run into a problem with how values are unpacked.
By d1
's definition, it should work with bindTransition
, because a statement like
_jumpIn 1 d1 $ s "bd"
means
jumpIn 1 p 1 . (|< orbit 1) $ s "bd"
however...
_jumpIn 1 p 1 . (|< orbit 1) $ s "bd"
evaluates find, while
_jumpIn 1 d1 $ s "bd"
doesn't.
Even if I remove the (|< orbit 1)
portion, it doesn't evaluate, because it doesn't treat d1
as two arguments.
Is there any way to make the interpeter treat d1
and p 1 . (|< orbit1)
as the exact same expression?