スポンサーの募集は締め切りました。以後は GitHub Sponsors に移行する予定です。
どのような募集をしていたか知りたい場合は履歴を確認してください。
function! s:fold(list, f, init) abort | |
let ref = {'result': a:init} | |
return map(copy(a:list), {_,v -> extend(ref, {'result': a:f(ref.result, v)})})[-1].result | |
endfunction | |
function! s:fold2(list, f, init) abort | |
let l = a:list + [a:init] | |
let end = len(a:list) | |
return map(l, {i,v -> i is# end ? l[i-1] : a:f(l[i-1], v)})[-1] | |
endfunction |
スポンサーの募集は締め切りました。以後は GitHub Sponsors に移行する予定です。
どのような募集をしていたか知りたい場合は履歴を確認してください。
// This example uses ES2015 features. Use Babel to compile down to JS, or see the example at http://codepen.io/sardell/pen/VjGYRz | |
// example array provided | |
var example = [[1,2,[3]],4]; | |
function flatten_array(nested) { | |
// concatenate using the spread operator | |
const flat = [].concat(...nested) | |
// repeat flatten_array function until nested array is flat | |
return flat.some(Array.isArray) ? flatten_array(flat) : flat; |
OCamlを自習する。 浅井健一著『プログラミングの基礎』とそのWebサイト http://pllab.is.ocha.ac.jp/~asai/book-mov/ を使う。
UTF-8で漢字の入出力に対応させるのがわりと面倒。
UbuntuなどDebian系のGNU/Linuxにはapt-get
で簡単にインストールできる:
a あ ア ア 0 | |
i い イ イ 0 | |
u う ウ ウ 0 | |
e え エ エ 0 | |
o お オ オ 0 | |
ka か カ カ 0 | |
ki き キ キ 0 | |
ku く ク ク 0 | |
ke け ケ ケ 0 | |
ko こ コ コ 0 |
更新: | 2024-05-20 |
---|---|
作者: | @voluntas |
バージョン: | 2024.1 |
URL: | https://voluntas.github.io/ |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Runtime.InteropServices; | |
using System.Net; | |
using System.IO; | |
using System.Threading; | |
namespace KCB2 |