[1015] in Coldmud discussion meeting

root meeting help first first in chain previous in chain previous next last

Re: [COLD] maplist stuff

daemon@ATHENA.MIT.EDU (Mon Jun 10 11:50:10 1996 )

Date: Mon, 10 Jun 1996 09:35:43 -0600 (MDT)
From: Brandon Gillespie <brandon@tombstone.sunrem.com>
To: coldstuff@cold.org
In-Reply-To: <199606092045.WAA25166@regoc.srce.hr>

> After day's thought, I think that introducing new keywords may be bad
> idea in any case. How about doing it the way Mathematica does (okay,
> with slight changes in the operator names so that decompilation doesn't
> break):
> 
> maplist:	[1,2,3] \@ x -> x+1;
> mapindex:       l \# x -> l[len-x];
> findindex:	l \? x -> x>0;
> filter:         l \* x -> x>0;
> 
> And maybe:
> 
> maptohash:      l \& x -> [x,0];  <-- this one should return a
> 				      hashtable
> Index equivalent to this:   l \+ x -> [p[x],q[x]];
> 
> The problem is whether we can use backslash (it's free at the moment,
> isn't it?)
> 
> Cryptic, but with helps, one can get used to this. :)

I would much rather stay with keywords, otherwise we turn into PERL.

-Brandon