We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7efbcca commit 1c44746Copy full SHA for 1c44746
README.md
@@ -29,6 +29,14 @@ puts "s: #{s}"
29
puts "n: #{n}"
30
puts "r: #{r}"
31
puts "e: #{e}"
32
+
33
+arr = [0, 1, 2]
34
35
+p arr[0]
36
+p Option.from(arr[0])
37
+p arr[10]?
38
+p Option.from?(arr[10]?)
39
+p Option.from! { arr[10] }
40
```
41
42
## Development
main.cr
@@ -1,4 +1,5 @@
1
require "./src/option"
2
+# require "types/option"
3
4
s = Some[0]
5
n = None(Int32)[]
@@ -10,3 +11,11 @@ puts "s: #{s}"
10
11
12
13
14
15
16
17
18
19
20
21
0 commit comments