Content-Disposition: inline
Why this sample not work?
f1 : { {[y] x+y}}
(f1[5])[7] / fail!
Content-Disposition: inline
Why this sample not work?
f1 : { {[y] x+y}}
(f1[5])[7] / fail!
I found some solution with function projection: f1 : { {[x;y] x+y}[x;]} f1[5][7] / ok.May be exist different solutions?On Sep 10, 8:35?pm, “Alexandr Batalshikov” <abatalshi…>wrote:> Why this sample not work?>> > f1 : { {[y] x+y}}> > (f1[5])[7] / fail!</abatalshi…>
In document “K reference manual (version 2.0)” on page 158 writenexample for local functions: k) f : {b:3; g:{b}; b:4; g} k) fBut in my version kdb+ is not work (even in k-mode).This is bug?My version kdb+: KDB+ 2.4 2008.03.31 Copyright (C) 1993-2008 Kx Systems w32/ 1()core 511MB Alx home-comp 192.168.1.2 TIMEOUT 2009.04.01
kdb-s K is called k4, it is similar to k2/k3, but at the same time acompletely rewritten product, they are non-compatible versions, sothat document’s most examples won’t work (but the way of thinking isstill the same)in k4 there is no lexical scoping, you have to pass on the variablesjust like you did (it is not unlike C)Regards, AttilaOn Wed, Sep 10, 2008 at 6:59 PM, abbat wrote:>> In document “K reference manual (version 2.0)” on page 158 writen> example for local functions:>> k) f : {b:3; g:{b}; b:4; g}> k) f>> But in my version kdb+ is not work (even in k-mode).> This is bug?>> My version kdb+:> KDB+ 2.4 2008.03.31 Copyright (C) 1993-2008 Kx Systems> w32/ 1()core 511MB Alx home-comp 192.168.1.2 TIMEOUT 2009.04.01> >>