[1014] in Coldmud discussion meeting

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

[COLD] maplist stuff

daemon@ATHENA.MIT.EDU (Sun Jun 9 16:55:19 1996 )

From: silovic@srce.hr (Miroslav Silovic)
To: coldstuff@cold.org
Date: Sun, 9 Jun 1996 22:45:09 +0200 (MET DST)


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. :)

	Miro