Suppose I have a string like "10100 000." What would be the best way to
construct the corresponding vector of BitVectors [ [true, false, true,
false, false], [false, false, false] ]?
Here's what I've come up with:
[map(c -> c == '1', collect(str)) for str in split(text)]
A downside to this method is that it seems to confuse Julia's type
inference. Is there a more idiomatic way to do this?
Two more related questions:
2) How should I choose between array comprehensions and map()? They seem to
have the same functionality.
3) Is Array{Bool, n} the same thing as a BitArray{n}? The documentation
seems to imply that they are different. When should you use one over the
other? And how do you convert one to the other?
Thanks.