Reformulating the explicit like this
a {~ I. *./ 0 <2 3 5|"0 1 a
23 29 31 37 41 43 47 49 53 59 61 67 71 73 77 79
Makes it easier to make tacit
2 3 5 (] #~ [: *./ 0 < |"0 1) a
23 29 31 37 41 43 47 49 53 59 61 67 71 73 77 79
---Björn Helgason wrote:
> My daughter came home with a mathematical assignment and the
> solution can be
> expressed like this
> [a=.20+i.61
> [b=.(-.0=2| a)#a
> [c=.(-.0=3| b)#b
> [d=.(-.0=5| c)#c
>
> or
>
> (([: -. 0 = 5 | ([: -. 0 = 3 | ] #~ [: -. 0 = 2 | ]) # ]
> #~ [: -. 0 = 2
> | ]) # ([: -. 0 = 3 | ] #~ [: -. 0 = 2 | ]) # ] #~ [: -. 0 =
> 2 | ]) 20+i.61
> 23 29 31 37 41 43 47 49 53 59 61 67 71 73 77 79
>
> I would like to get the 2 3 5 out of the equation to the left or right
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm