]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.tutorial/scl/Tutorial/1.08 Side effects.md
Import org.simantics.scl.tutorial from incubator SVN repo
[simantics/platform.git] / bundles / org.simantics.scl.tutorial / scl / Tutorial / 1.08 Side effects.md
1 # Side effects\r
2 \r
3 Even if the functional programming style prefers writing\r
4 pure functions without side-effects, sometimes side-effects\r
5 are the reason for running the function in the first place.\r
6 \r
7 This section lists the most important functions with\r
8 side-effects that are defined in the SCL standard library.\r
9 \r
10 ## Printing\r
11 \r
12 ::value[Prelude/print, Prelude/printString, Prelude/printError, Prelude/printingToFile]\r
13 \r
14 ## References\r
15 \r
16 ::value[Prelude/ref, Prelude/getRef, Prelude/:=]\r
17 \r
18 ## Mutable arrays\r
19 \r
20 ::data[ArrayList/T]\r
21 ::value[ArrayList/new]\r
22 ::value[ArrayList/add]\r
23 ::value[ArrayList/remove]\r
24 ::value[ArrayList/get]\r
25 ::value[ArrayList/length]\r
26 ::value[ArrayList/contains]\r
27 \r
28 ::value[ArrayList/iter, ArrayList/for]\r
29 ::value[ArrayList/mapInPlace]\r
30 ::value[ArrayList/popUntilEmpty]\r
31 \r
32 ## Escaping side-effects\r
33 \r
34 ::value[Builtin/runProc]