From 6391752b4bf16f98dc907dbc0070e099a273ae0c Mon Sep 17 00:00:00 2001 From: breandan Date: Sat, 25 Jan 2020 01:39:34 -0500 Subject: [PATCH] update README for heterogeneous dimensional expressions #4 --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bf25c718..beda6e6a 100644 --- a/README.md +++ b/README.md @@ -429,7 +429,12 @@ val z = f(1.0, 2.0) // Returns a value println(z) // Prints: 7 ``` -Currently, it is only possible to represent functions where all inputs and outputs share a single type. In future iterations, it is possible to extend support for building functions with varying input/output types and enforce constraints on both, using [covariant and contravariant](https://kotlinlang.org/docs/reference/generics.html) type bounds. +Additionally, it is possible to build functions consisting of varying dimensional inputs: + +```kotlin +fun > mlp(p1: VFun, p2: MFun, p3: T) = + ((p1 * p2 + p1 * p2 * p2 dot p1 + p1) - p3) pow p3 +``` #### Coroutines