with utilities to help minimize typing and parentheses part 1
Sel =: 1 : '] #~ u' daF =: 1 : ('a =. (''2 : '', (quote m) , '' u'') label_. 1 : (''u 1 :'' , quote a)') at =: 'u (v@:) 'daF atop =: 'u (v@) 'daF nd =: 'u (v&)' daF # ( 2 (4 2 $ 'abcdpqxy')-:"1 nd\ +./ at ]) +./ at -. atop "1 Sel ( 2 =/\ ]) +./ at"1 Sel 'aeiou' ( 3 <: ="0 1 +/"1 atop +/ at)"1 Sel > cutLF a for part 2, this is a bad solution that involves taking out 3 letters in a row but putting back in 4 letters in a row. the spec wasnt super clear on that rule, and this turned out to be the answer. In terms of double adverbs, I did not get rid of all @s. The one in the middle is kept because too many gaps between double adverbs makes it hard to follow the pairings (though extra whitespace that wont show in email works pretty good for this) Less =: 1 : '] -. u' # +./@( 4 (1 = #@~.)\ ])"1 Sel Less @:((3 (1 = ~.#at)\ ]) +./ atop"1 Sel) Less (3 (({. ~: 1&{) *. {. = {:)\ ]) +./ at"1 Sel@:((1 < >./"1)@:([: +/\"1 [: = 2 <\ ]) +./ atop"1 Sel) at > cutLF a ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm