Hi, Michael: Ah! Ok, thanks!
Greg -----Original Message----- From: Michael Heuer [mailto:[email protected]] Sent: Thursday, November 21, 2013 10:39 To: ChucK Users Mailing List Subject: Re: [chuck-users] What does $ do? Hello Greg, $ is the cast operator, documented here http://chuck.cs.princeton.edu/doc/language/oper.html In the example you have posted, the specific class of reference.get(i) is not known, so it must be cast to Interval. This is a pattern similar to how collections in java were used before generic types were added to the language. michael On Thu, Nov 21, 2013 at 11:29 AM, Gregorio Gomez <[email protected]> wrote: > > Hello, everybody: > > I've been looking at Michael Heuer's (most excellent) LiCK library. He uses > an idiom that I don't see documented: > > intervals.get(i) $ Interval @=> Interval interval; > > from Arpeggiator.ck, line 35 > https://github.com/heuermh/lick/blob/master/Arpeggiator.ck > > What does $ do? > > Of course just because I don't see it in the documentation doesn't mean it's > not there, so please feel free to point me to the docs if I've overlooked it. > > Thanks! > Greg > > _______________________________________________ > chuck-users mailing list > [email protected] > https://lists.cs.princeton.edu/mailman/listinfo/chuck-users _______________________________________________ chuck-users mailing list [email protected] https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
