シンタックスハイライトがあっても読みやすさが一切変わらないのが凄い
参考URL: https://qiita.com/koi_kotya/items/c730c0be5c898092ac79
全8種類
- ,
- .
- +
- -
fizzbuzz:: [Int] -> String | |
fizzbuzz xs = f xs "" | |
where | |
f [] s = s | |
f (y:ys) s = f ys (s++show(fizzbuzzfunc y)++footer) | |
fizzbuzzfunc x = header x ++ fizz x ++ buzz x | |
header x = show(x) ++ ": " | |
fizz x | mod x 3 == 0 = "fizz" | |
| otherwise = "" |
--Haskellでラムダ | |
--syntax sugar | |
mul = \x y -> x * y | |
mul' = \x -> \y -> x * y | |
main = do | |
--束縛せずに書ける | |
print $ (\x -> \y -> x*y) 4 5 | |
--カリー化 |
-- 2つのリストの差を求める | |
difList::[Int]->[Int]->Int->[Int] | |
difList xs ys n = [(xs!!x) - (ys!!x)|x<-[0..n-1]] | |
readIntList::IO[Int] | |
readIntList = map read . words <$> getLine | |
-- IO Stringから整数のリストを読み込む | |
readArray::IO String -> IO[Int] | |
readArray = fmap $ map read . words |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using static System.Console; | |
using static PB10004.Algorithm.Util; | |
namespace PB10004.Algorithm | |
{ |
シンタックスハイライトがあっても読みやすさが一切変わらないのが凄い
参考URL: https://qiita.com/koi_kotya/items/c730c0be5c898092ac79
全8種類
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
public class Hello{ | |
public static void Main(){ | |
// Your code here! | |
var N = int.Parse(Console.ReadLine()); | |
var array = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); | |
CountUp game = new CountUp(N, array); | |
game.Solve(); |
javascript:(function(){ document.getElementsByTagName("html")[0].contentEditable = true; })();
$script = <<SCRIPT | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
source $HOME/.cargo/env | |
SCRIPT | |
Vagrant.configure("2") do |config| | |
config.vm.box = "generic/debian10" | |
config.vm.synced_folder "./volume", "/home/vagrant/app", create: true | |
config.vm.provision "shell", inline: $script, privileged: false |