I agree with Greg (itistoday). If you hand the reins over to him, it will be in good hands.
Hopefully you can contact Lutz and get an approval. WDYT?
Best, Rick (rickyboy)
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
(define (get-indices L (child 0) (parents '()) (result '()))
(if (empty? L)
result
(get-indices (1 L) (+ 1 child) parents
(append
(snoc result (snoc parents child))
(if (list? (L 0))
(get-indices (L 0) 0 (snoc parents child))
'())))))
(define (get-indices L (child 0) (parents '()) (result '()))
(if (empty? L)
result
(list? (L 0))
(get-indices (1 L) (+ 1 child) parents
(append (snoc result (snoc parents child))
(get-indices (L 0) 0 (snoc parents child))))
(get-indices (1 L) (+ 1 child) parents
(snoc result (snoc parents child)))))
(define (snoc xs x) (push x xs -1))
Quote from: newBert post_id=25018 time=1619774817 user_id=147
I tried this, unpretentious:https://controlc.com/10370640">https://controlc.com/10370640
Quote from: octowuss post_id=24979 time=1609486240 user_id=1457
That doesn't make any sense [...] and wanted to learn more Lisp, but this version is full of these incomprehensible "gimmicks" that make it very difficult to work out how to use it!
> (define (sum:sum x) (inc sum:current-total x))
(lambda (x) (inc sum:current-total x))
> (sum 1)
1
> (sum 1)
2
> (sum 2)
4
> (sum 3)
7
>
> sum:sum
(lambda (x) (inc sum:current-total x))
>
Quote from: octowuss post_id=24979 time=1609486240 user_id=1457
Also, why does the example have a 0 after the x in the parameter list for sum?
I can leave that out and the function still works!
Over time envrironment and stack memory gets fragmented by certain functions. The error forces a total low level freeing and reallocation of this memory. There is nothing we can do about it without slowing down everywhere, but it is a rare enough problem. Until now, I have never seen this before.Quote from: "Lutz"
Quote from: "cameyo"@rickyboy and @ralph.ronnquist
Sorry, I didn't explain myself well. The function i tried was "merge" with temporary heap function.