mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-16 17:27:33 +02:00
Added adb lambda id functions
This commit is contained in:
parent
cb9d143187
commit
bba1783a49
1 changed files with 6 additions and 0 deletions
|
@ -39,6 +39,8 @@
|
||||||
adb:get/default
|
adb:get/default
|
||||||
adb:set!
|
adb:set!
|
||||||
adb:get-db
|
adb:get-db
|
||||||
|
adb:lambda-ids
|
||||||
|
adb:max-lambda-id
|
||||||
simple-lambda?
|
simple-lambda?
|
||||||
one-instance-of-new-mutable-obj?
|
one-instance-of-new-mutable-obj?
|
||||||
;; Analysis - well-known lambdas
|
;; Analysis - well-known lambdas
|
||||||
|
@ -114,6 +116,10 @@
|
||||||
(set! *adb* (make-hash-table)))
|
(set! *adb* (make-hash-table)))
|
||||||
(define (adb:get key) (hash-table-ref *adb* key))
|
(define (adb:get key) (hash-table-ref *adb* key))
|
||||||
(define (adb:get/default key default) (hash-table-ref/default *adb* key default))
|
(define (adb:get/default key default) (hash-table-ref/default *adb* key default))
|
||||||
|
(define (adb:lambda-ids)
|
||||||
|
(filter number? (hash-table-keys *adb*)))
|
||||||
|
(define (adb:max-lambda-id)
|
||||||
|
(foldl max (adb:lambda-ids)))
|
||||||
(define (adb:set! key val) (hash-table-set! *adb* key val))
|
(define (adb:set! key val) (hash-table-set! *adb* key val))
|
||||||
(define-record-type <analysis-db-variable>
|
(define-record-type <analysis-db-variable>
|
||||||
(%adb:make-var
|
(%adb:make-var
|
||||||
|
|
Loading…
Add table
Reference in a new issue