[ https://issues.apache.org/jira/browse/FREEMARKER-86?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16314475#comment-16314475 ]
Daniel Dekany commented on FREEMARKER-86: ----------------------------------------- It will look a bit strange though, as the template language can't pollute the top-leve namespace. That leaves two possibilities: `[a, b]?max`, and `.max(a, b)` (the last uses the built-in variable syntax, like `.version`, etc.). I think we should go for `[a, b]?max`. (BTW, as an unintended benefit, that's also usable like `someList?max`.) > 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 > > 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 (v6.4.14#64029)