syntactic sugar for $apply f var$ #3

Closed
filippo opened this Issue Apr 27, 2009 · 4 comments

Projects

None yet

2 participants

@filippo
Owner

Add some syntactic to apply. E.g.
$apply upperCase strings.name$
might be written as:
$string.name:upperCase$

@gregorej

I'd love to have that feature.

@filippo
Owner

I'll try to work on it in the weekend or earlier if I can :-)

@gregorej

Great! I was also thinking about having additional parameters for these functions, like:

In this case the ```default/2``` function would take user's name as first argument and string as the second. Does this sound reasonable?
@filippo
Owner

It's a good idea, but I think the second element should be another attribute to be passed when rendering the template.
Otherwise you have to distinguish all the various data types and there coud be problems identifying atoms from attributes.

@filippo filippo closed this Oct 13, 2011
@filippo filippo reopened this Oct 13, 2011
@filippo filippo added a commit that closed this issue Oct 16, 2011
@filippo fix #3 : $apply f val$ can be written $val:f$
apply at the moment accepts only one argument so also the ":" works with only one argument
e1c6be3
@filippo filippo closed this in e1c6be3 Oct 16, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment