# encoding: ascii
# api: powershell
# title: LetterDiamondOneliner v3
# description: @Karl
# version: 0.1
# license: CC0
# x-poshcode-id: 1040
# x-archived: 2009-04-23T15:19:45
#
# > ...but couldn’t get it smaller than a twitter message length
# 139 chars w/o arg
#
&{param([char]$c)[int]$s=65;$p=$c-$s;$r=,(' '*$p+[char]$s);$r+=@(do{"{0,$p} {1}{0}"-f([char]++$s),(' '*$f++)}until(!--$p));$r;$r[-2..-99]}Z
# trimmed 130 chars w/o arg
&{param([char]$c)$p=$c-($s=65);$r=,(' '*$p+[char]$s);do{$r+="{0,$p} {1}{0}"-f([char]++$s),(' '*$f++)}until(!--$p);$r;$r[-2..-99]}J
# trimmed to 127 chars w/o arg
&{$p=[char]$args[0]-($s=65);$r=,(' '*$p+[char]$s);do{$r+="{0,$p} {1}{0}"-f([char]++$s),(' '*$f++)}until(!--$p);$r;$r[-2..-99]}J