Drkcore

20 07 2009 OCaml Tweet

OCamlでtake

今日のOCaml

Ocamlはlistでtakeが使えん。どうもextlibを使う必要があるらしい。

# #require "extlib";;
/opt/local/lib/ocaml/site-lib/extlib: added to search path
/opt/local/lib/ocaml/site-lib/extlib/extLib.cma: loaded
# open ExtList.List;;
# let a = [1;2;3;4;5;6;7;8;9;0];;
val a : int list = [1; 2; 3; 4; 5; 6; 7; 8; 9; 0]
# take 3 a;;
- : int list = [1; 2; 3]

About

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

Tag

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

Ad

© kzfm 2003-2021