gelisam / klister

an implementation of stuck macros
BSD 3-Clause "New" or "Revised" License
129 stars 11 forks source link

mutual recursion #161

Closed gelisam closed 1 year ago

gelisam commented 2 years ago

Implement a defuns macro which allows the definition of mutually-recursive functions.

Fixes #160.

gelisam commented 2 years ago

@sorawee, would you like to try reviewing this PR? I can walk you through the Klister syntax if you want, either via PR comments or a video call.

sorawee commented 2 years ago

@gelisam thanks very much for the invitation! Unfortunately, I won't be free until this Saturday. I will definitely take a look at this later. But please proceed without my inputs.

gelisam commented 2 years ago

Unfortunately, I won't be free until this Saturday.

Take your time!

gelisam commented 1 year ago

@sorawee , do you still plan to review this PR? No rush, just making sure you didn't forget :)

sorawee commented 1 year ago

Oops, sorry!

Let me take a look at this tomorrow (this time for real, but if I don't again, definitely go forward without me!)

sorawee commented 1 year ago

I see that added files are under the examples directory. Would it be better to rename it to prelude or lib that conveys that these files are not just demo/tests, but something that is encouraged to be used?

Obviously, if you think it makes more sense to do that in a separate PR, that works too!

EDITED: I just saw that there are actual examples/tests at the end of the file. Those bits seem to be appropriate in the examples directory. I still think the actual macro should be moved somewhere else.

gelisam commented 1 year ago

I see that added files are under the examples directory. Would it be better to rename it to prelude or lib that conveys that these files are not just demo/tests, but something that is encouraged to be used?

For now, almost everything goes in ./examples. #54 tracks the task of organizing which modules go in #lang "prelude.kl", which modules go in ./stdlib, and which modules should stay in ./examples.

gelisam commented 1 year ago

I was waiting for @sorawee to do a second review after I addressed their comments, but I think I already took enough of their time. Merging!

sorawee commented 1 year ago

Oops, sorry! I didn't you were waiting for a second review. Please merge it. It looks good to me.