***catonano__ is now known as catonano
***apteryx_ is now known as apteryx
***sputny1 is now known as sputny
<R1ck77>Hi! Is there any way to add a docstring to function definitions (a-la-elisp/Clojure)? <sneek>Welcome back R1ck77, you have 2 messages! <sneek>R1ck77, dsmith says: "Chibi-Scheme is a very small library with no external dependencies, intended for use as an extension and scripting language in C programs." <mwette>Rick77. If the first expression in a procedure body is a string, then it serves as the docstring. (define (foo) "does nothing" #t) ; guile> ,d foo <janneke>hmm, i'm getting a build failure for guile-1.8.8 on x86 <janneke>ERROR: Value out of range -9223372036854775808 to 9223372036854775807: -9223372036854775808 <topoi>How do i transform '(a (b c)) to '((a) ((b) (c)))? It should be plainsimple but i seem to do overlook something. <sneek>topoi, wingo says: there were problems in guile and g-wrap, but now for me guile-gnome works fine with master <topoi>I just want to transform the elements in a tree. <topoi>chrislck: Thx. =) Ugly is better than dysfunctional. I tried with recursion and stateless (foldr like) but seemed to make some stupid mistakes which I could not see. <topoi>(I needed it for a better representation of a huffman tree; you need small fun projects for keeping fit. I lost it as it seems. =) <justin_smith>but it calls reverse, which walks the entire result at the end <topoi>justin_smith: There was a useless layer in it. As I failed to flatten the bottom layer I tried the inverse and failed again, became quite frustrated after a while and then joined #guile to find some friendly folks who arbitrated my anger. =) <justin_smith>topoi: haha, well hopefully one of our examples help then <topoi>I'll walk through each of them. Thanks all! =) <justin_smith>chrislck: well it did respond to the question literally (while the others make new lists) <stis>oh I forgot to return the value of the ackumulaotor: (let ((ack (mk-ackumulator))) (tree-traversal x ack) (ack))) <stis>is the corrected version <justin_smith>if fold-right isn't acceptable, pretend I called reverse! on the result of fold <justin_smith>oh I left out the actual call: (map-tree list '(a (b c))) => ((a) ((b) (c))) <justin_smith>my map version doeos less work, by actually producing the result in the same order the output needs it <R1ck77>Hi! Is there in Guile the equivalent of Clojure's interpose? <R1ck77>(interpose "," '("hello" "there")) -> '("hello" "," "there") <rgherdt>hmm, not the same, sorry. this one merges the strings <R1ck77>can I add a separator while joining? The stuff I'm doing is actually strings, so.. <R1ck77>it does exactly what I need, thank you rgherdt! <R1ck77>(still curious if a general interpose exists btw, so if there is any taker, he/she's welcome) ***Ekho- is now known as Ekho