Re: Differences in mapping functions

2014-07-28 Thread Alexander Burger
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

Re: Differences in mapping functions

2014-07-28 Thread S Pico
Hi Alex The diagram you produced makes a very nice and succinct reference...                    Whole list     Only CAR       --+-+---       No result |     map     |    mapc                 |             |       append    |    maplist  |   mapcar                 | 

Re: Differences in mapping functions

2014-07-28 Thread Amaury Hernández Águila
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

Re: Differences in mapping functions

2014-07-28 Thread Thorsten Jolitz
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

Re: Differences in mapping functions

2014-07-28 Thread S Pico
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

Re: Differences in mapping functions

2014-07-28 Thread Alexander Burger
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

Differences in mapping functions

2014-07-28 Thread S Pico
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