Skip to content

Help with functor not running/illegal use of nesting operator #329

@Spainardzap

Description

@Spainardzap

I am having trouble making this run:

code:
functor
export generic:Generic
define
fun {Generic Op InitVal N}
if N == 0 then InitVal
else {Op N {Generic Op InitVal (N-1)}}
end
end
end

error:
%************************* expansion error **********************
%**
%** illegal use of nesting marker
%**
%** in file "Oz", line 2, column 0
%** ------------------ rejected (1 error)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions