@Brian
Tacit bz would certainly be harder to maintain than BZ for beginners like me
bz=: '0'"_ ` (I.@:(' '&=)@]) ` ]}~
Case in point : why is there a ~ at the end of bz?
Sometimes the answer is in front of me but I take a while to recognize it :
the gerund form of amend needs a left argument and ~ does the trick
As a bonus this led me to derive a dyadic version which replaces blanks in
the right argument by the left argument:
bc =: [ ` (I.@(' '&=)@]) ` ]}
'-' bc 'aaa bbb ccc'
aaa-bbb-ccc
On Sat, Jan 27, 2018 at 1:39 PM, Brian Schott <[email protected]>
wrote:
> bz=: '0'"_`(I.@:(' '&=)@])`]}~
> dtf=: (SE KS} bz) @:(FT& ":)@] NB. Date Time Format
> dtf t
>
> Well, I got the tacit to work after seeing my typo of { in the place of } .
> But I am not sure there is any benefit to the tacit over non-tacit
> wrt your issue of maintaining code.
>
> On Sat, Jan 27, 2018 at 1:07 PM, Brian Schott <[email protected]>
> wrote:
>
> > Intriguing ideas, Jimmy (and Joe).
> >
> > I might offer better formatting for others:
> >
> > SE=: '-- ::' NB. Spacing Elements
> > KS=: 4+3*i.5 NB. Koordinates of Spacing elements
> > FT=: 4 3 3 3 3 7j3 NB. Formatting Time elements
> > BZ=: 3 : '''0'' (I. y='' '') } y' NB. Blanks to Zeroes
> > DTF=: 3 : 'SE KS} BZ FT ": y' NB. Date Time Format
> > ]t=: 6!:0 '' NB. ymmv: 2018 1 26 16 54 0.188
> > DTF t NB. ymmv: 2018-01-26 16:54:00.188
> >
> > Though I wanted to go further to make the verbs more tacit, I have been
> > unsuccessful so far.
> > At least it was easy for me to rename verbs with lower case initial
> > letters:
> >
> > bZ=: 3 : '''0'' (I. y='' '') } y' NB. Blanks to Zeroes
> > dTF=: 3 : 'SE KS} bZ FT ": y' NB. Date Time Format
> > dTF t
> >
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm