Drkcore

16 04 2007 javascript mochikit Tweet

MochiKitのイテレータとリストを行ったり来たり

MochiKitはIter([list])でイテレータにlist(iterator)でリストになる。

で、最近お気に入りのInterpreterで動かしてみた。

>>> l = [1,2,3,4,5,6,7]
[1, 2, 3, 4, 5, 6, 7]
>>> i = iter(l)
arrayLikeIter(...)
>>> i.next()
1
>>> i.next()
2
>>> i.next()
3
>>> list(i)
[4, 5, 6, 7]

なるほど牧場。

About

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

Tag

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

Ad

© kzfm 2003-2021