chobbes
February 16, 2017, 2:21pm
1
I’m trying to take a look of the function which defines the syntax of the square brackets and the semi-colon. Apparently, I’m doing something very wrong:
julia> @enter [1;2]
ERROR: AssertionError: isa(arg,Expr) && arg.head == :call
Can anyone let me know what is the correct way to enter the right piece of the code? Thanks!
Does @enter temp = [1,2] work?
chobbes
February 16, 2017, 2:30pm
3
Unfortunately not:
julia> @enter temp = [1;2]
ERROR: AssertionError: isa(arg,Expr) && arg.head == :call
julia> @enter temp = [1,2]
ERROR: AssertionError: isa(arg,Expr) && arg.head == :call
This might help:
using Gallium
f(x) = [x,x+1]
@enter f(1)
1 Like
chobbes
February 16, 2017, 2:38pm
5
Aha! Brilliant idea! Thanks for the workaround. It works!