Jikka-5.0.11.1: A transpiler from Python to C++ for competitive programming
Copyright(c) Kimiyuki Onaka 2021
LicenseApache License 2.0
Maintainerkimiyuki95@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Jikka.RestrictedPython.Convert.UseAppend

Description

 
Synopsis

Documentation

run :: (MonadAlpha m, MonadError Error m) => Program -> m Program Source #

run converts xs = xs + [x] and xs += [x] to xs.append(x).

Examples

Before:

xs = xs + [x]
xs += [x]
xs.append(x)

After:

xs.append(x)
xs.append(x)
xs.append(x)