• R/O
  • SSH

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修订版f8698468d2fb7956da8d5feba8a871b003ad0f2c (tree)
时间2010-09-10 19:24:05
作者lorenzo
Commiterlorenzo

Log Message

I added another trivial function to find the [i[j]] entry of a list of lists.

更改概述

差异

diff -r 748816743f6a -r f8698468d2fb haskell/simple_read.hs
--- a/haskell/simple_read.hs Thu Sep 09 22:56:09 2010 +0000
+++ b/haskell/simple_read.hs Fri Sep 10 10:24:05 2010 +0000
@@ -49,6 +49,13 @@
4949
5050 print second_col
5151
52+ let my_el=find_ij trans 1 3
53+
54+ putStrLn "The element [1,3] (counted from zero!) in my list is, "
55+
56+ print my_el
57+
58+
5259
5360
5461
@@ -57,3 +64,6 @@
5764 firstColumn xss = head (transpose xss)
5865
5966 nthColumn xss n = (transpose xss) !! n -- my first haskell function!
67+
68+find_ij xss i j = (xss !! i) !! j -- for the case of this function, each entry of a list of lists (i.e. each sublist) is meant to be
69+ --a row.
\ No newline at end of file