Skip to content

Instantly share code, notes, and snippets.

@nedzadarek
nedzadarek / floatlist2.hs
Created April 13, 2013 14:49
Doing list of float, from 1 to 2, step 0.2; second method. [working]
[x/10 | x <- [10, 12..20]]
@nedzadarek
nedzadarek / result_floatlist2
Created April 13, 2013 14:53
results of floatlist2.hs
[1.0,1.2,1.4,1.6,1.8,2.0]
#define rozmiar_listy 10
for(int i = 0; i<rozmiar_listy; i++) tab[i] = tab[i]+3;
for(int i = 0; i<rozmiar_listy; i += 2)
{
tab[i] = tab[i]+3;
tab[i+1] = tab[i+1]+3;
}
map (+3) lista
A =: A + 3
x2 =: 2 2 2 $ i. 8
x2
0 1
2 3
4 5
6 7
x2 (*"3 0) y
0 1
0 1
2 3
4 5
6 7
8 9
10 11
12 13
14 15
x2 (*"3 1) y