Skip to content

Commit afa0e56

Browse files
committed
update README
1 parent 5d4c510 commit afa0e56

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ The following functions are provided:
4545

4646
* `arange` - returns a regularly spaced array
4747
* `complement` - returns a set complement of two arrays
48+
* `empty` - returns an empty array
4849
* `filter` - filters an array using a logical input function
4950
* `foldl` - recursively left-folds an array using an input function
5051
* `foldr` - recursively right-folds an array using an input function
@@ -124,6 +125,17 @@ write(*,*)arange(5,1)
124125
125126
```
126127

128+
Use `empty` to generate a zero-length array of any Fortran standard
129+
kind:
130+
131+
```fortran
132+
write(*,*)size(empty(1))
133+
0
134+
```
135+
which may be useful to initialize accumulators, for example
136+
see the implementation of set `intersection` in this library.
137+
138+
127139
`head` returns the first element of the array:
128140

129141
```fortran

0 commit comments

Comments
 (0)