Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #50988

Rosetta Code: Array map

From "WJ" <w_a_x_man@yahoo.com>
Newsgroups comp.lang.forth
Subject Rosetta Code: Array map
Date 2016-09-15 05:23 +0000
Organization A noiseless patient Spider
Message-ID <nrdb82$dsl$1@dont-email.me> (permalink)

Show all headers | View raw


> Array map is a draft programming task. It is not yet
> considered ready to be promoted as a complete task, for
> reasons that should be found in its talk page.

> Map is defined on Wikipedia as "a higher-order function that
> applies a given function to each element of a list, returning
> a list of results".

OCaml:

Array:

# Array.map ((+) 5000) [|2;3;4;5;6|];;
- : int array = [|5002; 5003; 5004; 5005; 5006|]

List:

# List.map ((+) 5000) [2;3;4;5;6];;
- : int list = [5002; 5003; 5004; 5005; 5006]

-- 
General Mills ... aired a television commercial for ... Cheerios ... promoting
Aryan hybridization with blacks (depicting, as usual, a white woman and a black
man). ... The ad agency responsible for the campaign was ... [Jewish] Saatchi &
Saatchi....  www.counter-currents.com/2013/08/behind-anti-white-advertising

Back to comp.lang.forth | Previous | Next | Find similar | Unroll thread


Thread

Rosetta Code: Array map "WJ" <w_a_x_man@yahoo.com> - 2016-09-15 05:23 +0000

csiph-web