This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let rec fact n = | |
if n = 0I then 1I | |
else n * fact (n-1I) | |
let comb n r = | |
let a = fact n | |
let b = fact r | |
let c = fact (n-r) | |
(a / (b*c)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.InteropServices; | |
class Program | |
{ | |
static void Main() | |
{ | |
Write(false); | |
Write(true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Linq; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// 1. Trial.Ofの型引数を明示することで、実引数であるメソッド参照の型が決まる | |
var result1 = new[] { "aaa", "bbb", "ccc" } |