Run through an array We all often hear the idiom "walk through the array" to mean "map the function over the following array". However, I need it done (now!), so I want you to run through the array.

How do I run?

Imagine there's a wild pack of wolves behind you

Running through an array is like walking through one, except you  can skip over elements. Yes, it's sometimes messy, but it (generally) works. "Which elements are skipped?", you may ask. Well, this is done at random. Let's walk through running through the array!


Let e be the current element.
Let random generate a random float in [0,1). If random() &lt; 0.5, then you go the next element and then to step 1. (You may generate a number by other means, so long as their is an (ideally) equal chance of skipping and remaining. E.g., you can use choose an element from a two-member set and perform the action based on the result.)
Otherwise, you perform function f on e.


Objective

Given an array/list/string like either A and a number K, run through the array, adding K to each member accessed. Output/return this array. A will only contain non-negative integers, and K will only ever be a non-negative integers. This is a code-golf, so the shortest program in bytes wins.

Test cases (examples)

K, A =&gt; possible K'
[1, 2, 3, 4], 0 =&gt; [1, 2, 3, 4]
[1, 2, 3, 4], 1 =&gt; [1, 3, 3, 5]
[0, 0, 0, 0], 2 =&gt; [2, 0, 0, 2]
Clojure, 41 37 bytes

(fn[a k](map #(+(*(rand-int 2)k)%)a))


Knocked off a couple of bytes by multiplying by 0 or 1 and dropping the "if". Credit to most all of the other submitters!