David Ward Lambert wrote:
>
> Are there simple versions of swap and of move_to_front that use C. , A.
> or (other)? My definitions use amend. Thank you, Dave.
>
> 1 5 swap 'abcdefgh'
> afcdebgh
>
> 3 move_to_front 'abc*ef'
> *abcef
>
>
> swap=: ({~ |.)~`[`]}
> move_to_front=: ((({~ _1&|.)~`[`]})~ i.@:>:)~
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
>
move2front=: { , {. , }.@}.
3 move2front 'abc*ef'
*abcef
--
View this message in context:
http://old.nabble.com/Understanding-C.-%2C-A.-tp33237118s24193p33237585.html
Sent from the J Programming mailing list archive at Nabble.com.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm