Skip to content

Commit

Permalink
simplify docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Jul 11, 2024
1 parent 6cb039b commit 32100ec
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions base/cartesian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,7 @@ macro nif(N, condition, operation...)
end

"""
nif(condition, expression, ::Val{N}) where {N}
nif(condition, expression, else_expression, ::Val{N}) where {N}
nif(condition, expression, [else_expression,] ::Val{N}) where {N}
Generate a sequence of `if ... elseif ... else ... end` statements.
Expand All @@ -271,7 +270,7 @@ Generate a sequence of `if ... elseif ... else ... end` statements.
the condition is true.
- `else_expression`: (optional) A function that takes `N` as input
returns an expression to be evaluated if all conditions are false.
- `N`: The number of conditions to check, passed as a `Val{N}` type.
- `N`: The number of conditions to check, passed as a `Val{N}` instance.
This function is similar to the `@nif` macro but can be used in cases
where `N` is not known at parse time.
Expand Down

0 comments on commit 32100ec

Please sign in to comment.