[Jprogramming] Hugs and Kisses

bob therriault bobtherriault at mac.com
Wed Dec 19 15:48:27 UTC 2012


After a good night's sleep,

HAK=: '()X' $~ 3 * */
   HAK 2 2 3
()X()X()X()X()X()X()X()X()X()X()X()X
   HAK 1 1 1
()X

This felt like one of those Edward DeBono solutions where what you know gets in the way of what you are trying to do. In this case, I just needed to create a string of '()X' of a certain length and I was letting the original shape get in the way.

Cheers, bob

On 2012-12-18, at 11:22 PM, bob therriault wrote:

> Hi Linda,
> 
> Using your definitions for Hugs and Kisses I came up with this.
> 
>   HANDK =: 3 : 0
> h=. ('()'$~}:,2*{:) y
> k=. y $ 'X'
> h ,@((_2]\,@[),.|:@,@]) k
> )
>   HANDK 2 2 3
> ()X()X()X()X()X()X()X()X()X()X()X()X
> 
> Cheers, bob
> 
> On 2012-12-18, at 7:48 PM, Linda Alvord wrote:
> 
>>  H=: 13 :'((}:y),2*{:y)$''()''' 
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm



More information about the Programming mailing list