You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Topos recently started to acquire patterning capabilities but patterns are mostly constituted of values: [1,2,3].beat(). This is nice, but it should not stop there.
It would be nice to be able to pattern function application: [1,2,3].apply([reverse(2), palindrome].bar()).beat(). This is already possible but there is currently two issues:
it is ugly. The syntax could be better to do so!
the code is not optimised to do so. You have to declare the reverse two times, once as a general high-order functions and a second time for the data structure inheriting that capability.
The work to make this better is rather easy. Strudel is using a register() function that is mapping high-order functions to different data structures. Topos should probably do the same to be a cool algorithmic pattern language.
The text was updated successfully, but these errors were encountered:
Topos recently started to acquire patterning capabilities but patterns are mostly constituted of values:
[1,2,3].beat()
. This is nice, but it should not stop there.It would be nice to be able to pattern function application:
[1,2,3].apply([reverse(2), palindrome].bar()).beat()
. This is already possible but there is currently two issues:reverse
two times, once as a general high-order functions and a second time for the data structure inheriting that capability.The work to make this better is rather easy. Strudel is using a
register()
function that is mapping high-order functions to different data structures. Topos should probably do the same to be a cool algorithmic pattern language.The text was updated successfully, but these errors were encountered: