mit-scheme-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

help with rb-tree/update!


From: JP de Vooght
Subject: help with rb-tree/update!
Date: Sat, 19 Nov 2022 16:49:05 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

Hello,

I was looking into rb-tree for a multiset where I could use leafs as key counts. This is based on code by Alex Shinn which uses SRFI-146 which I had trouble using. I thought rb-tree could be useful here.

I noticed from reviewing the /src/runtime/rbtree.scm an undocumented function called rb-tree/update! which takes two optional arguments.

The function invokes apply-fail as follows (apply-fail fail 'rb-tree/update!) but apply-fail is defined below with three arguments (apply-fail fail key caller).

Could it be passing the key is missing from rb-tree/update! ?

If yes, how can I fix this myself for my local version of scheme? I tried making the change and running Setup.sh / configure / make / make install with no luck.

Could you show me an example of how to call this function so that I can handle the case of a new key setting its value count to 1?

TIA

JP





reply via email to

[Prev in Thread] Current Thread [Next in Thread]