[Jprogramming] Amend }

Oleg Kobchenko olegykj at yahoo.com
Tue Aug 5 01:34:43 HKT 2008


> From: Brian Schott <schott.brian at gmail.com>
> 
>    '0'[ `((I.@:=)&' '@])`]} ' 5\ 3\2004'
> 
> Use the gerund form. You were very close.

He was even closer, using the verb form.

   '0' I.@:=&' '@]} ' 5\ 3\2004'
05\03\2004



> From: Matthew Brand <mtthwbrnd at googlemail.com>
> 
> Hi All,
> 
> I am struggling with the amend adverb. I know I am doing something
> incredibly silly, but cannot find a solution.
> 
> As an example, I want to replace the spaces in a date with '0'. I come
> unstuck everytime I try to use }.
> 
> I try things like:
> '0' ((I.@:=)&' ')} ' 5\ 3\2004'
> |domain error
> |   '0'    ((I.@:=)&' ')}' 5\ 3\2004'
> 
> 
> I know how to do it in steps:
> 
>    indices =. (I.@:=&' ') ' 5\ 3\2004'
>    '0' indices} ' 5\ 3\2004'
> 05\03\2004
> 
> but want to know how to use it in one go like: '0' ((I.@:=)&' ')} ' 5\
> 3\2004'
> 
> I am thinking (wrongly)  that  ((I.@:=)&' ')} prduces a dyad which
> evaluates as  x ( ((I.@:=)&' ') y)} y.


      


More information about the Programming mailing list