2009-07-01 44 views
1

我剛開始嘗試拿起殲語言,感到困惑以下幾點:Ĵ@未正常工作

1 2 +/@{ i.4 
1 2 
    +/ 1 2 { i.4 
3 

爲@它說,在文檔中時:「徐@ VY ↔uxvy」

我以爲我只是弄錯講話的一部分另一個,但不能弄明白

也是,我怎麼知道是什麼類型的語音的名字是什麼?

回答

4
 
    NB. u b. 0 returns the rank ofu 
    NB. the rank of a verb determines the arguments it applies to at a time 
    NB. monadic+ y applies to atoms; dyadic x + y applies to pairs of atoms 
    + b. 0 
0 0 0 
    NB. monadic+/ y and dyadic x +/ y apply to anything (unbounded rank) 
    +/ b. 0 
_ _ _ 
    NB. monadic{ y applies to arrays of atoms; 
    NB. dyadic x { y applies to pairs of atoms and anything 
    { b. 0 
1 0 _ 
    NB. u @ v has the rank of v 
    +/@{ b. 0 
1 0 _ 
    NB. since 1 2 { i.4 returns atoms at a time, +/ works on atoms 
    +/"0 [ 1 2 { i.4 
1 2 
    NB. u @: v has unbounded rank 
    +/@:{ b. 0 
_ _ _ 
    NB. +/ applies to all of 1 2 { i.4 at once 
    +/"_ [ 1 2 { i.4 
3 

    NB. mechanical translation to tacit form 
    13 : '+/ x { y' 
[: +/ { 
+0

非常有幫助,謝謝:) – cobbal 2009-07-06 18:31:10

0

嗯,我想我可能已經想通了,我需要使用@:代替@

1 2 +/@:{ i.4 
3 

這正是我想要的。猜猜我將不得不閱讀了更多的秩一些,這是@之間唯一的不同@:

+0

你的排名研究結果如何,cobbal?一旦我終於明白這一點,這是一個非常令人大開眼界的經驗。 – 2010-09-25 00:01:32

1

維基百科,在我的偏見的意見,秩一個體面的書面記錄,這意味着什麼

require'trace' 
    trace '1 2 +/@{ i.4' 

這將帶你一步:在「講話」中J.

不同部分

但要回答原來的問題的背景下,其語法是如何工作的J的跟蹤工具對於瞭解有用通過逐步解析過程,顯示每個生產消耗的單詞規則和每個產生的結果。