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


Groups > comp.lang.forth > #50988 > unrolled thread

Rosetta Code: Array map

Started by"WJ" <w_a_x_man@yahoo.com>
First post2016-09-15 05:23 +0000
Last post2016-09-15 05:23 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.forth


Contents

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

#50988 — Rosetta Code: Array map

From"WJ" <w_a_x_man@yahoo.com>
Date2016-09-15 05:23 +0000
SubjectRosetta Code: Array map
Message-ID<nrdb82$dsl$1@dont-email.me>
> 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

[toc] | [standalone]


Back to top | Article view | comp.lang.forth


csiph-web