summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/asymptote/mapArray.asy
blob: 5a499b8c680f87b4aba41440c01ac4e7fd7e91c3 (plain)
1
2
3
4
5
6
7
8
9
typedef import(Src, Dst);

private typedef Dst MapType(Src);

Dst[] map(MapType f, Src[] a) {
  return sequence(
      new Dst(int i) {return f(a[i]);},
      a.length);
}