Skip to content

Commit b1b147c

Browse files
add functional constructs
1 parent a2e704c commit b1b147c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/array_partition.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ end
119119
build_arraypartition(N, expr)
120120
end
121121

122+
## Functional Constructs
123+
124+
Base.mapreduce(f,op,A::ArrayPartition) = mapreduce(f,op,(mapreduce(f,op,x) for x in A.x))
125+
Base.any(f,A::ArrayPartition) = any(f,(any(f,x) for x in A.x))
126+
122127
## indexing
123128

124129
@inline function Base.getindex(A::ArrayPartition, i::Int)

0 commit comments

Comments
 (0)