Re: [pure-lang-users] Proposed syntax changes
Status: Beta
Brought to you by:
agraef
From: Albert G. <Dr....@t-...> - 2008-08-15 13:51:30
|
Eddie Rucker wrote: >> 1 2 3 > Hey Libor, that's cute! Tain't thought of that one. But, ... How do you > get at the elements? That's easy: > f x = a [] x with a xs (x@_ y) = a (y:xs) x; a xs x = x:xs end; > f (1 2 3 4); [1,2,3,4] > Would be nice if we could have something like [1 2 3 4] That would wreak havoc on the Pure grammar. But the above hack should do the trick as long as the first element can't be mistaken for a closure. Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |