|Re: Flatten Sequence(String) to String [message #1664055 is a reply to message #1663937]
||Tue, 10 March 2015 18:16
| Ed Willink
Registered: July 2009
Today you need to use iterate something like:
let aList : Sequence(String) ... in 'Relies on: [' +
aList->iterate(s; acc : String = '' | if acc = '' then acc + s else acc
+ ', ' + s endif) +']'
On 10/03/2015 17:15, Robbie Simpson wrote:
> Hi folks,
> I currently have an Acceleo expression that evaluates to a
> Sequence(String). In my case, this expression is a list of
> dependencies, so I want to end up with a compound string that looks
> something like : "Relies on: [Dependency, Dependency]. My problem is
> that the logical way to do this seems to be by concat - but something
> like concat("Relies on", mylongexpression) throws a type error, as one
> element is a String and the other is
> a Sequence(String).
> Could you advise a solution to this? Is there someway of flattening a
> Sequence(String) down to an individual String, or a better way of
> combining the two?
Powered by FUDForum
. Page generated in 0.06875 seconds