Skip to content

Popping into the parent environment? #17

@trans

Description

@trans

I thought it would be nice if we could put the name of function first when defining it, so I wrote this:

($t $w ^t ^w pop) $.

For example:

(  
  ($t $w ^t ^w pop) $.

  'foo ( $x ^x print ) .
  12 foo
)

This would print 12, but instead it errors saying it Failed to find in key='foo' in environment. But it almost works, if I write instead:

(  
  ($t $w ^t ^w pop 12 foo) $.
  'foo ( $x ^x print ) .
)

It will print 12, since foo gets defined in that first sub-environment. But obviously, I want to push the definition up into in the parent environment.

Is there a way to do this that I am missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions