Skip to content

Commit

Permalink
some small touch-ups
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Jul 12, 2011
1 parent 936b915 commit 4f9c08d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions doc/todo
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,7 @@ issues 1/24/11
. assign
. reduce
. cat
ref assign reduce permute find

something about update operators, in-place operations in general

Expand Down
6 changes: 4 additions & 2 deletions j/list.j
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@ function append2(a, b)
end
end

append(lst::List) = lst

function append{T}(lst::List{T}, lsts...)
n = length(lsts)
l = nil(T)
for i = n:-1:1
l = lsts[n]
for i = (n-1):-1:1
l = append2(lsts[i], l)
end
return append2(lst, l)
Expand Down
3 changes: 2 additions & 1 deletion j/string.j
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ end

escape_string(s::String) = print_to_string(length(s), print_escaped, s, "\"")
print_quoted(s::String) = (print('"'); print_escaped(s, "\"\$"); print('"'))
#" # work around syntax highlighting problem
quote_string(s::String) = print_to_string(length(s)+2, print_quoted, s)

# bare minimum unescaping function unescapes only given characters
Expand Down Expand Up @@ -839,7 +840,7 @@ end

# concatenate byte arrays into a single array

memcat() = Array(Int8,0)
memcat() = Array(Uint8,0)
memcat(a::Array{Uint8,1}) = copy(a)

function memcat(arrays::Array{Uint8,1}...)
Expand Down
2 changes: 1 addition & 1 deletion j/tensor.j
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ end

all(A::Tensor{Bool}, region::Region) = areduce(all, A, region)
any(A::Tensor{Bool}, region::Region) = areduce(any, A, region)
count(A::Tensor{Bool}, region::Region) = areduce(count, A, region, Int)
count(A::Tensor{Bool}, region::Region) = areduce(count, A, region, Int32)

function isequal(x::Tensor, y::Tensor)
if size(x) != size(y)
Expand Down

0 comments on commit 4f9c08d

Please sign in to comment.