Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
using System; | |
using System.Runtime.CompilerServices; | |
using System.Threading.Tasks; | |
public static class TaskTupleExtensions | |
{ | |
#region (Task<T1>) | |
public static TaskAwaiter<T1> GetAwaiter<T1>(this ValueTuple<Task<T1>> tasks) | |
{ |
param ( | |
$sessionUrl = "ftp-host-name", | |
$username = "your-username", | |
$password = "your-password", | |
$remotePath = "/", | |
$localPath = "C:\projects\...", | |
$batches = 20 | |
) | |
namespace Analogy | |
{ | |
/// <summary> | |
/// This example shows that a library that needs access to target .NET Standard 1.3 | |
/// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET | |
/// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library. | |
/// </summary>INetCoreApp10 | |
class Example1 | |
{ | |
public void Net45Application(INetFramework45 platform) |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
A monad is a fancy word for a generic type of the form MyMonad<T>
(a generic type of arity 1).
A monad is special because it adds 'special powers' to the T
that it wraps.
These 'special powers' won't sound very special to an imperative programmer, so you have to squint to see them but bear with me.
IEnumerable<T>
is a monad that gives values of type T
the special power of nondeterminism, or the ability to 'be' multiple values at once.Nullable<T>
is a monad that gives values of type T
the special power of nullability, or the ability to be absent.Task<T>
is a monad that gives values of type T
the special power of asynchronicity, or the ability to be used before they are computed.The trick with monads comes when you want to play with the T
values, because they are inside another type. C# introduced language changes to make dealing with values inside these monads easier:
<# | |
.Synopsis | |
Converts a PowerShell object to a Markdown table. | |
.EXAMPLE | |
$data | ConvertTo-Markdown | |
.EXAMPLE | |
ConvertTo-Markdown($data) | |
#> | |
Function ConvertTo-Markdown { | |
[CmdletBinding()] |
<# | |
.Synopsis | |
Converts a PowerShell object to a Markdown table. | |
.EXAMPLE | |
$data | ConvertTo-Markdown | |
.EXAMPLE | |
ConvertTo-Markdown($data) | |
#> | |
Function ConvertTo-Markdown { | |
[CmdletBinding()] |
#![feature(macro_rules)] | |
macro_rules! active_match { | |
//Single zero parameter case | |
($m:expr, $i:ident() => $b:block) => { | |
match $i($m) { | |
Some(()) => $b, | |
_ => panic!("Encountered an unmatched active case.") | |
} | |
}; |
/* BitSet.cs -- A vector of bits. | |
Copyright (C) 1998, 1999, 2000, 2001, 2004, 2005 Free Software Foundation, Inc. | |
This file is part of GNU Classpath. | |
GNU Classpath is free software; you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation; either version 2, or (at your option) | |
any later version. | |