Jacobi symbol: Difference between revisions
Content added Content deleted
m (→{{header|Haskell}}: Disaggregated the tabulation functions a little) |
|||
Line 290: | Line 290: | ||
------------------------- DISPLAY ------------------------- |
------------------------- DISPLAY ------------------------- |
||
jacobiTable :: Int -> Int -> String |
jacobiTable :: Int -> Int -> String |
||
jacobiTable nCols nRows = |
jacobiTable nCols nRows = |
||
⚫ | |||
⚫ | |||
colLabels = [0 .. pred nCols] |
|||
⚫ | |||
⚫ | |||
⚫ | |||
labelledRows (fmap show rowLabels) $ |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
-------------------------- TEST --------------------------- |
-------------------------- TEST --------------------------- |
||
main :: IO () |
main :: IO () |
||
main = putStrLn $ jacobiTable 11 9 |
main = putStrLn $ jacobiTable 11 9 |
||
------------------ TABULATION FUNCTIONS ------------------- |
------------------ TABULATION FUNCTIONS ------------------- |
||
paddedCols |
|||
:: Show a |
|||
=> [[a]] -> [[String]] |
|||
paddedCols cols = |
paddedCols cols = |
||
let scols = fmap show <$> cols |
let scols = fmap show <$> cols |