[
https://issues.apache.org/jira/browse/FREEMARKER-131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17036537#comment-17036537
]
Dániel Dékány commented on FREEMARKER-131:
------------------------------------------
As of {{?map}}, the intended usage is just transforming a list of objects to a
list of some of it's property. That's needed for example if you have some
macros for common formatting tasks, which deal with list of strings for
example, but you have a list of user objects, each has a name. You can't pass
the list of user object to said macro, so you map it to the list of user names.
Also, we don't provide a way to efficiently build a list element by element, so
there wasn't even an acceptable workaround for such situations before {{?map}}.
> Add distinct built-in to sequence
> ---------------------------------
>
> Key: FREEMARKER-131
> URL: https://issues.apache.org/jira/browse/FREEMARKER-131
> Project: Apache Freemarker
> Issue Type: Wish
> Reporter: Jasper de Vries
> Priority: Major
>
> {code}
> ["a", "a", "b", "c", "c"]?distinct
> {code}
> should return:
> {code}
> ["a", "b", "c"]
> {code}
> Order does not matter, you can always sort later if it does.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)