User talk:Wamba: Difference between revisions
Content added Content deleted
SqrtNegInf (talk | contribs) (→Markov chain text generator: new section) |
|||
(One intermediate revision by one other user not shown) | |||
Line 17: | Line 17: | ||
(%).push: @prefix Z=> @words[$n .. *]; |
(%).push: @prefix Z=> @words[$n .. *]; |
||
</pre> |
</pre> |
||
--[[User:SqrtNegInf|SqrtNegInf]] ([[User talk:SqrtNegInf|talk]]) 17:08, 5 February 2017 (UTC) |
|||
:Hi, first item is no problem because ( <code>"Alice was" eq ("Alice", "was")</code> ). Secondly, <code>push</code> is needed and It does not work rigth without. Thank you SqrtNegInf . |
|||
:--[[User:Wamba|Wamba]] ([[User talk:Wamba|talk]]) 12:49, 6 February 2017 (UTC) |
Latest revision as of 12:51, 6 February 2017
Hi, when marking the perl5 example for best shuffle as incorrect you need to move the longer explanation to the talk page as a sub-section, leaving just the {{incorrect|Perl 6|See xxx in talk page}}.
Thanks, --Paddy3118 (talk) 16:36, 24 June 2015 (UTC)
Markov chain text generator
Really good to get 'rotor' back into the Perl 6 solution, a definite improvement over the fix I made.
But I think two details need to be taken care of:
• @prefix should contain strings, not lists (eg "Alice was" not ("Alice", "was")
• the routine needs to explicitly return a hash
So something along the lines of:
my @prefix.push: .join(' ') for @words.rotor: $n => -$n+1; (%).push: @prefix Z=> @words[$n .. *];
--SqrtNegInf (talk) 17:08, 5 February 2017 (UTC)