[ 
https://issues.apache.org/jira/browse/FREEMARKER-86?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16350492#comment-16350492
 ] 

Evermind commented on FREEMARKER-86:
------------------------------------

Would it be an option that we use oneĀ name like "util" or something, and put 
'min', 'max' and all other utility functions under it? So it would become 
"util.min(a, b)" or "util.min(list)". If "util" is a fixed top level name, then 
it could be prepended by '.', thus becoming ".util.min(a, b)", which IMO is 
acceptable since it can be regarded as built-in variable. And in the futureĀ 
similar functions can have a place to place into.

> min(x,y) and max(x,y)
> ---------------------
>
>                 Key: FREEMARKER-86
>                 URL: https://issues.apache.org/jira/browse/FREEMARKER-86
>             Project: Apache Freemarker
>          Issue Type: Improvement
>          Components: engine
>            Reporter: Vojtech Knyttl
>            Priority: Major
>
> It would be great to have these two builtins for numbers. At the moment, I 
> have to create functions like:
> {code}
> <#function max(a, b)>
>      <#return (a > b)?then(a, b)>
> </#function>
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to