Skip to main content

Timeline for Same length sub arrays

Current License: CC BY-SA 3.0

8 events
when toggle format what by license comment
Jun 9, 2016 at 22:28 comment added Maltysen I guess mathematica's short-circuiting is just weird and I'm not understanding it...sorry
Jun 9, 2016 at 22:28 comment added LLlAMnYP @Maltysen I'm not seeing how that would be helpful.
Jun 9, 2016 at 22:24 comment added Maltysen oic, can you do instead then {}&&stuff?
Jun 9, 2016 at 22:21 comment added LLlAMnYP @Maltysen Your statement is the inverse of mine and is also true. I'm referring to a@{} -> {} && ArrayQ@{} -> {} && True -> {}. This is desirable. But let b = {{1},{2},{3}}, then a@b -> b && ArrayQ@b -> b && True -> b -> {{1},{2},{3}} whereas we need True here.
Jun 9, 2016 at 22:18 comment added Maltysen why does it do that? shouldn't it return c if b is true?
Jun 9, 2016 at 22:17 comment added LLlAMnYP @Maltysen That doesn't seem to work, it'll always return the array if it is an array then (b&&c will always return b if c evaluates to True).
Jun 9, 2016 at 22:12 comment added Maltysen I don't have my mathematica rpi running atm, but IIRC, you can save by special casing {} by doing a@b_:=b&&ArrayQ@b
Jun 9, 2016 at 21:55 history answered LLlAMnYP CC BY-SA 3.0