From 57e5e8ab59f2ae5b60c9ac0f7d624ba91a0af563 Mon Sep 17 00:00:00 2001 From: Harry Georgakopoulos Date: Fri, 27 May 2016 15:09:57 -0500 Subject: [PATCH] Update index.md Two changes here: One on line 196 where the value should be updated to 6, and the other for the droprepeats() command which was mentioned but not shown in the code snippet (please verify this is correct). --- doc/index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/index.md b/doc/index.md index 7dee8fb..e1ebbd9 100644 --- a/doc/index.md +++ b/doc/index.md @@ -193,7 +193,7 @@ julia> value(y) julia> push!(x, 3) julia> value(y) -3 +6 ``` When we wrote `y=foldp(+, 0, x)` we created a signal `y` which collects updates to `x` using the function `+` and starting from `0`. In other words, `y` holds the sum of all updates to `x`. @@ -228,6 +228,8 @@ You can drop repeated updates to a signal with [`droprepeats`](api.html#droprepe ```{.julia execute="false"} julia> p = Signal(0) +julia> droprepeats(p) + julia> foreach(println, p) julia> push!(p, 0)