-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
There are some cases where I want something roughly like
(@fix (@fix 1 + _) / 3)((2,))
and
(@fix (@fix _ + _) / _)((1, 2), 3)
to work.
There needs to be a mechanism to prevent this nesting (that is, to maintain the current behavior). Currently
julia> (@fix (@fix _ + _) / _)
(::Fix{typeof(/),Tuple{Some{Fix{typeof(+),Tuple{Nothing,Nothing},NamedTuple{(),Tuple{}}}},Nothing},NamedTuple{(),Tuple{}}}) (generic function with 1 method)
and so the encoding for the nesting behavior should probably just not wrap the Fix{typeof(+),...}
in Some
. That is, I desire the following:
julia> (@fix Some(@fix _ + _) / _)
(::Fix{typeof(/),Tuple{Some{Fix{typeof(+),Tuple{Nothing,Nothing},NamedTuple{(),Tuple{}}}},Nothing},NamedTuple{(),Tuple{}}}) (generic function with 1 method)
and
julia> (@fix (@fix _ + _) / _)
(::Fix{typeof(/),Tuple{Fix{typeof(+),Tuple{Nothing,Nothing},NamedTuple{(),Tuple{}}},Nothing},NamedTuple{(),Tuple{}}}) (generic function with 1 method)
Metadata
Metadata
Assignees
Labels
No labels