在近代高等程式語言快(ㄏㄨˋ)速(ㄒ一ㄤ)演(ㄔㄠ)化(ㄒㄧˊ)的狀況下,很多 strong type 的程式語言都開始有了 generic 的設計, 舉例來說:
(這只是大略分類)
- Mobile: Swift, Kotlin
- Frontend: Flowtype, TypeScript
- 後端語言:Python (pyre), Scala, C#, Java (沒錯!現在連 Java 都有)
digraph G { | |
subgraph cluster_gc { | |
label = "general concepts"; | |
training_vs_testing -> overfitting_and_verification; | |
regularization | |
} | |
linear_regression -> persception_learning; | |
logistic_regression -> linear_regression; |
在近代高等程式語言快(ㄏㄨˋ)速(ㄒ一ㄤ)演(ㄔㄠ)化(ㄒㄧˊ)的狀況下,很多 strong type 的程式語言都開始有了 generic 的設計, 舉例來說:
(這只是大略分類)
rayshih-mbp:vue-react rayshih$ cat test.jsx | |
export default () => { | |
const items = [1, 2, 3]; | |
return ( | |
<ul> | |
<li v-for="item in items"> | |
There is something todo with {item} | |
</li> | |
</ul> |
import TensorFlow | |
print(Tensor(3)) | |
// y = - 3 * x + 7 | |
let indices = -10...10 | |
let xs = indices.map { x -> Float in Float(x) } | |
let ys = indices.map { x -> Float in Float(x) * (-3) + 7 + Float.random(in: -1.0...1.0) } |
module Main where | |
import Prelude | |
import Data.String (joinWith) | |
import Control.Monad.Eff.Console (logShow) | |
import Data.List (List(..), fromFoldable) | |
import Data.Monoid (class Monoid) | |
import Control.Monad.Writer (execWriter, tell) | |
import TryPureScript (render, withConsole) |
module Main where | |
import Prelude | |
import Effect (Effect) | |
import Effect.Console (log) | |
import Data.Ord (abs) | |
import Data.List (List(Nil), range, (:), length) | |
import Data.Traversable (traverse) |
module Main where | |
import Prelude | |
import Control.Monad.Eff (Eff) | |
import Control.Monad.Eff.Console (logShow, CONSOLE) | |
import Data.Ord (abs) | |
import Data.List (List(Nil), mapWithIndex, range, (:), filter, length, foldl) | |
import Data.Foldable (all) | |
import Data.Traversable (traverse) |
module Main where | |
import Prelude | |
import Control.Monad.Eff.Console (log) | |
import TryPureScript (render, withConsole) | |
data Weekday = Monday | |
| Tuesday | |
| Wednesday |
package ninenine | |
// ----- Data ----- | |
sealed class NineNine | |
data class Item(val x: Int, val y: Int): NineNine() | |
data class Col( | |
val x: Int, | |
val n: Int | |
): NineNine() { | |
val items = |