@ has joined the channel
import Data.Array main :: IO () main = do let m = listArray ((1,1),(10,10)) [i+j |i<-[1..10], j<-[1..10]] print $ minPath m ! (8,8) minPath :: Array (Int,Int) Int -> Array (Int,Int) Int minPath mat = listArray ((1,1),(10,10)) $ [ f i j | i<-[1..10], j<-[1..10]] where f 1 1 = mat ! (1,1) f 1 j = mat ! (1,j) + minPath mat ! (1,j-1) f i 1 = mat ! (i,1) + minPath mat ! (i-1,1) f i j = if minPath mat ! (i-1,j) > minPath mat ! (i,j-1) then minPath mat ! (i,j-1) + mat ! (i,j) else minPath mat ! (i-1,j) + mat ! (i,j)
:
とは何のことですか。 • タプルとは何ですか。 :
とは何のことですか。 • タプルとは何ですか。 :
とは何のことですか。 • タプルとは何ですか。 { description = "haskell-mytutorial"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; flake-utils.url = "github:numtide/flake-utils"; }; outputs = inputs: inputs.flake-utils.lib.eachDefaultSystem ( system: let pkgs = inputs.nixpkgs.legacyPackages.${system}; in { devShells.default = pkgs.mkShell { packages = with pkgs; [ stack haskell-language-server ]; }; } ); }
2025-08-16 15:55:50.8370000 [client] INFO Finding haskell-language-server 2025-08-16 15:55:50.8380000 [client] INFO Checking for ghcup installation 2025-08-16 15:55:50.8470000 [client] INFO probing for GHCup binary 2025-08-16 15:55:50.8560000 [client] WARN ghcup at /home/hello/.ghcup/bin/ghcup does not exist