j
Setting the rank of a user-defined verb in J
Here\'s a function to calculate the digital sum of a number in J: digitalSum =: +/@:(\".\"0)@\": If I use b. to query the rank of this verb, I get _ 1 _, i.e., infinite. (We can ignore the dyadic ca[详细]
2023-01-01 20:02 分类:问答How to filter a list in J?
I\'m currently learning the fascinating J programming lan开发者_Python百科guage, but one thing I have not been able to figure out is how to filter a list.[详细]
2022-12-31 12:37 分类:问答How to install new modes in emacs 23 on OS X?
I just downloaded the Haskell and J modes off of SourceForge, and I\'m having trouble figuring out how to make them interface with emacs 23. Google searches yield detailed instructions for emacs 22, b[详细]
2022-12-31 09:43 分类:问答How do I define a monadic function to work on a list in J?
Let\'s say I have the following J expression: # 3 ((|=0:)#]) 1+i.1000 This counts the number of numbers between 1 and 1000 that are evenly divisible by 3. (Now, before anyone points out that there\'[详细]
2022-12-30 18:01 分类:问答Best strategies for reading J code
I\'ve been using J for a few months now, and I find that reading unfamiliar code (e.g. that I didn\'t write myself) is one of the most challenging aspects of the language, particularly when it\'s in t[详细]
2022-12-29 02:12 分类:问答How to refactor this in J?
Here is a different approach for the Project Euler #1 solution: +/~.(3*i.>.1000%3),5*i.>.1000开发者_如何学运维%5[详细]
2022-12-08 03:13 分类:问答