|
| 1 | +--- |
| 2 | +title: ExampleDoc |
| 3 | +--- |
| 4 | + |
| 5 | +## Values |
| 6 | + |
| 7 | +Functions and constants included in the ExampleDoc module. |
| 8 | + |
| 9 | +### ExampleDoc.**singleLineExample** |
| 10 | + |
| 11 | +```grain |
| 12 | +singleLineExample : (index: a, array: b) -> Number |
| 13 | +``` |
| 14 | + |
| 15 | +SingleLineExample |
| 16 | + |
| 17 | +Examples: |
| 18 | + |
| 19 | +```grain |
| 20 | +singleLineExample(1, [1, 2, 3]) |
| 21 | +``` |
| 22 | + |
| 23 | +### ExampleDoc.**multiLineExample** |
| 24 | + |
| 25 | +```grain |
| 26 | +multiLineExample : (index: a, array: b) -> Number |
| 27 | +``` |
| 28 | + |
| 29 | +MultiLineExample |
| 30 | + |
| 31 | +Examples: |
| 32 | + |
| 33 | +```grain |
| 34 | +let x = multiLineExample(1, [1, 2, 3]) |
| 35 | +print(x) // 1 |
| 36 | +``` |
| 37 | + |
| 38 | +### ExampleDoc.**multipleSingleLineExamples** |
| 39 | + |
| 40 | +```grain |
| 41 | +multipleSingleLineExamples : (index: a, array: b) -> Number |
| 42 | +``` |
| 43 | + |
| 44 | +SingleLineExample |
| 45 | + |
| 46 | +Examples: |
| 47 | + |
| 48 | +```grain |
| 49 | +singleLineExample(1, [1, 2, 3]) == 1 |
| 50 | +``` |
| 51 | + |
| 52 | +```grain |
| 53 | +assert singleLineExample(1, [1, 2, 3]) == 1 |
| 54 | +``` |
| 55 | + |
| 56 | +```grain |
| 57 | +print(singleLineExample(1, [1, 2, 3])) |
| 58 | +``` |
| 59 | + |
| 60 | +### ExampleDoc.**multipleMultiLineExample** |
| 61 | + |
| 62 | +```grain |
| 63 | +multipleMultiLineExample : (index: a, array: b) -> Number |
| 64 | +``` |
| 65 | + |
| 66 | +MultiLineExample |
| 67 | + |
| 68 | +Examples: |
| 69 | + |
| 70 | +```grain |
| 71 | +let x = multiLineExample(1, [1, 2, 3]) |
| 72 | +print(x) // 1 |
| 73 | +``` |
| 74 | + |
| 75 | +```grain |
| 76 | +let x = multiLineExample(1, [1, 2, 3]) |
| 77 | +assert x == 1 |
| 78 | +``` |
| 79 | + |
| 80 | +```grain |
| 81 | +let x = multiLineExample(1, [1, 2, 3]) |
| 82 | +x == 1 |
| 83 | +``` |
| 84 | + |
| 85 | +### ExampleDoc.**mixedLineExample** |
| 86 | + |
| 87 | +```grain |
| 88 | +mixedLineExample : (index: a, array: b) -> Number |
| 89 | +``` |
| 90 | + |
| 91 | +MultiLineExample |
| 92 | + |
| 93 | +Examples: |
| 94 | + |
| 95 | +```grain |
| 96 | +let x = multiLineExample(1, [1, 2, 3]) |
| 97 | +print(x) // 1 |
| 98 | +``` |
| 99 | + |
| 100 | +```grain |
| 101 | +let x = multiLineExample(1, [1, 2, 3]) |
| 102 | +assert x == 1 |
| 103 | +``` |
| 104 | + |
| 105 | +```grain |
| 106 | +let x = multiLineExample(1, [1, 2, 3]) |
| 107 | +x == 1 |
| 108 | +``` |
| 109 | + |
| 110 | +```grain |
| 111 | +singleLineExample(1, [1, 2, 3]) == 1 |
| 112 | +``` |
| 113 | + |
| 114 | +```grain |
| 115 | +assert singleLineExample(1, [1, 2, 3]) == 1 |
| 116 | +``` |
| 117 | + |
| 118 | +```grain |
| 119 | +print(singleLineExample(1, [1, 2, 3])) |
| 120 | +``` |
| 121 | + |
0 commit comments