Hi Srini,
> Another difference is that the mapcon and mapcan functions must supply
> a function that returns a list, while the others can supply a function
> that returns an atom?
Not exactly. 'mapcon' and 'mapcan' can return any s-expression. These
results are then concatenated just as 'conc' do
Hi Alex
The diagram you produced makes a very nice and succinct reference...
Whole list Only CAR
--+-+---
No result | map | mapc
| |
append | maplist | mapcar
|
I agree. I'm constantly reading the reference of any lisp when dealing with
maps, and their descriptions are usually vague. When prototyping I always
ignore mapcon and mapcan because I always forget their difference (and
because of their destructive nature, which isn't considered functional).
El ju
Alexander Burger writes:
Hi Alex,
>> I am often confused between the variants of the map functions: map,
>> mapc, mapcar, mapcan, mapcon, maplist.
>
> Yes, indeed. The names of these 6 functions are historic, they are in
> most Lisp variants since early on.
[...]
> I hope this clears things up
Hi Alex
Thanks for your prompt reply...I am adding my replies inline..
Srini
> From: Alexander Burger
> To: picolisp@software-lab.de
> Sent: Monday, July 28, 2014 1:50:28 PM
> Subject: Re: Differences in mapping functions
...
> > I
Hi Srini,
> I am often confused between the variants of the map functions: map,
> mapc, mapcar, mapcan, mapcon, maplist.
Yes, indeed. The names of these 6 functions are historic, they are in
most Lisp variants since early on.
> Is there a short one-line synposis/organization of these functions
I am often confused between the variants of the map functions: map, mapc,
mapcar, mapcan, mapcon, maplist.
The other related ones are easier because of the names: fish, filter, pick,
extract ...
Their descriptions are very much alike, differing in maybe one line. Also, when
I want to us