All pastes #230879 Raw Edit

Anonymous

public text v1 · immutable
#230879 ·published 2006-10-31 14:10 UTC
rendered paste body
alias anagram { 
  var %x 1
  if ? iswm $1 echo $2 $+ $1
  while ($left($1,$calc(%x - 1)) $+ $right($1,- $+ %x) != $1) inc %x $a($v1,$2 $+ $mid($1,%x,1))
}
alias -l a return $anagram($1,$2)