P Pr Pre Pref Prefi Prefix Prefixe Prefixes Given some finite list, return a list of all its prefixes, including an empty list, in ascending order of their length.
(Basically implementing the Haskell function inits.)
Details

The input list contains numbers (or another type if more convenient).
The output must be a list of lists.
The submission can, but does not have to be a function, any default I/O can be used.
There is a CW answer for all trivial solutions.
This is code-golf, so the shortest code in bytes wins

Example
[] -&gt; [[]]
[42] -&gt; [[],[42]]
[1,2,3,4] -&gt; [[], [1], [1,2], [1,2,3], [1,2,3,4]]
[4,3,2,1] -&gt; [[], [4], [4,3], [4,3,2], [4,3,2,1]]
Haskell, 20 bytes

Edit: Yet a byte shorter with a completely different scan.

An anonymous function slightly beating the trivial import.



scanr(\_-&gt;init)=&lt;&lt;id


Try it online!


Uses =&lt;&lt; for the abbreviation (scanr(\_-&gt;init)=&lt;&lt;id) l = scanr(\_-&gt;init) l l.
Scans a list l from right to left, collecting intermediate results with the function \_-&gt;init.
That function ignores the elements scanned through (they're only used to get the right total length for the collected results), so really iterates applying init to the initial value of the scan, which is also l.