Drkcore

16 02 2010 Haskell Python Scala Tweet

Scalaのzipが

なんか慣れない。

scala> Array(1,2,3) zip Array(4,5,6)
res1: Array[(Int, Int)] = Array((1,4), (2,5), (3,6))

Haskellだとこんな感じでしょ。

Prelude> [1,2,3] `zip` [4,5,6]
[(1,4),(2,5),(3,6)]

Pythonだと

[1,2,3].zip([4,5,6])

とはできない。

>>> zip([1,2,3],[4,5,6])
[(1, 4), (2, 5), (3, 6)]

About

  • もう5年目(wishlistありマス♡)
  • 最近はPythonとDeepLearning
  • 日本酒自粛中
  • ドラムンベースからミニマルまで
  • ポケモンGOゆるめ

Tag

Python Deep Learning javascript chemoinformatics Emacs sake and more...

Ad

© kzfm 2003-2021