*sigh* Just when I was feeling clever, I discover I missed the obvious. ;>
Thanks, everyone.
On Fri, Jul 22, 2016 at 8:05 PM, Ryan Culpepper wrote:
> On 07/22/2016 07:58 PM, David Storrs wrote:
>
>> Thanks Jon, I appreciate the clear explanation.
>>
>> I'm using
On 07/22/2016 07:58 PM, David Storrs wrote:
Thanks Jon, I appreciate the clear explanation.
I'm using call-with-values in database code in order to turn a list into
an acceptable set of bind parameters. Here's an example:
(query-exec conn "insert into foo (bar, baz) values ($1, $2)"
On Fri, Jul 22, 2016 at 7:58 PM, David Storrs
wrote:
> Thanks Jon, I appreciate the clear explanation.
>
> I'm using call-with-values in database code in order to turn a list into
> an acceptable set of bind parameters. Here's an example:
>
> (query-exec conn "insert
I don't fully understand the use case... but have you looked at 'apply'?
> (define (sum4 a b c d)
(+ a b c d))
> (apply sum4 1 2 (list 3 4))
10
On Fri, Jul 22, 2016 at 7:58 PM, David Storrs
wrote:
> Thanks Jon, I appreciate the clear explanation.
>
> I'm using
Thanks Jon, I appreciate the clear explanation.
I'm using call-with-values in database code in order to turn a list into an
acceptable set of bind parameters. Here's an example:
(query-exec conn "insert into foo (bar, baz) values ($1, $2)" (some-func))
some-func returns a list, '("bob",
On Fri, Jul 22, 2016 at 6:30 PM, David Storrs
wrote:
>
> The best mental model I've been able to come up with is that (values)
> returns its results vertically but most functions expect to get them
> horizontally and will die if there are parallel lines of uncollected
>
I think I don't understand (values) very well. I expected the
following to return '(1 2 3):
-> (list (apply values '(1 2 3)))
(list (apply values '(1 2 3)))
; result arity mismatch;
; expected number of values not received
; expected: 1
; received: 3
; [,bt for context]
This, on the other
7 matches
Mail list logo