Comment detail

LL Golf Hole 8 - 横向きのピラミッドを作る (Nested Flatten)
for expression を使ってみる。
451bytes, 実質444bytes
1
2
3
4
5
6
7
8
<transform version="2.0" xmlns="http://www.w3.org/1999/XSL/Transform" xmlns:y="y">
<output method="text"/><param name="n"/>
<template match="/"><value-of separator="&#xA;" select="y:f(1)"/></template>
<function name="y:f"><param name="i"/>
<sequence select="(y:g($i),if($i=$n)then()else(y:f($i+1),y:g($i)))"/>
</function><function name="y:g"><param name="i"/>
<sequence select="string-join((for$x in(1 to$i)return('*')),'')"/>
</function></transform>

Index

Feed

Other

Link

Pathtraq

loading...