Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack-checker issue with inline row-polymorphic and static calls #2879

Open
mrjbq7 opened this issue Sep 26, 2023 · 0 comments
Open

Stack-checker issue with inline row-polymorphic and static calls #2879

mrjbq7 opened this issue Sep 26, 2023 · 0 comments

Comments

@mrjbq7
Copy link
Member

mrjbq7 commented Sep 26, 2023

Reported on Discord, this should work maybe:

:: quartets-find ( ... quot: ( max arr -- 'max ) -- ... )
    100 [0..b] [
        :> a
        100 a - [0..b] [
            :> b
            100 a b + - [0..b] [
                :> c
                100 a b c + + - :> d
                a b c d 4array
                quot call( max arr -- max' )
            ] each
        ] each
    ] each ; inline

But gives an error, related to the stack call(, this works:

:: quartets-find ( ... quot: ( max arr -- 'max ) -- ... )
    100 [0..b] [
        :> a
        100 a - [0..b] [
            :> b
            100 a b + - [0..b] [
                :> c
                100 a b c + + - :> d
                a b c d 4array
                quot call
            ] each
        ] each
    ] each ; inline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant